Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
1b456bd5
Unverified
Commit
1b456bd5
authored
Oct 17, 2025
by
Ali Imran
Committed by
GitHub
Oct 17, 2025
Browse files
docs: cleanup of runway model (#12503)
* cleanup of runway model * quality fixes
parent
af769881
Changes
98
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
62 additions
and
51 deletions
+62
-51
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py
...diffusion_variants/pipeline_stable_diffusion_paradigms.py
+6
-4
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py
...fusion_variants/pipeline_stable_diffusion_pix2pix_zero.py
+2
-1
src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion.py
...cated/versatile_diffusion/pipeline_versatile_diffusion.py
+2
-2
src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py
...consistency_models/pipeline_latent_consistency_img2img.py
+2
-2
src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py
...onsistency_models/pipeline_latent_consistency_text2img.py
+2
-2
src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py
...pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py
+3
-3
src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd.py
src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd.py
+6
-3
src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd_inpaint.py
...users/pipelines/pag/pipeline_pag_controlnet_sd_inpaint.py
+12
-8
src/diffusers/pipelines/pag/pipeline_pag_sd.py
src/diffusers/pipelines/pag/pipeline_pag_sd.py
+5
-5
src/diffusers/pipelines/pag/pipeline_pag_sd_img2img.py
src/diffusers/pipelines/pag/pipeline_pag_sd_img2img.py
+5
-5
src/diffusers/pipelines/pag/pipeline_pag_sd_inpaint.py
src/diffusers/pipelines/pag/pipeline_pag_sd_inpaint.py
+6
-6
src/diffusers/pipelines/pag/pipeline_pag_sd_xl_inpaint.py
src/diffusers/pipelines/pag/pipeline_pag_sd_xl_inpaint.py
+1
-1
src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py
...s/pipelines/paint_by_example/pipeline_paint_by_example.py
+2
-2
src/diffusers/pipelines/semantic_stable_diffusion/pipeline_semantic_stable_diffusion.py
...ic_stable_diffusion/pipeline_semantic_stable_diffusion.py
+3
-3
src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_inpaint.py
...stable_diffusion_3/pipeline_stable_diffusion_3_inpaint.py
+1
-1
src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py
...able_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py
+1
-1
src/diffusers/utils/hub_utils.py
src/diffusers/utils/hub_utils.py
+2
-1
tests/pipelines/pag/test_pag_sd_inpaint.py
tests/pipelines/pag/test_pag_sd_inpaint.py
+1
-1
No files found.
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py
View file @
1b456bd5
...
...
@@ -46,10 +46,12 @@ EXAMPLE_DOC_STRING = """
>>> from diffusers import DDPMParallelScheduler
>>> from diffusers import StableDiffusionParadigmsPipeline
>>> scheduler = DDPMParallelScheduler.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="scheduler")
>>> scheduler = DDPMParallelScheduler.from_pretrained(
... "stable-diffusion-v1-5/stable-diffusion-v1-5", subfolder="scheduler"
... )
>>> pipe = StableDiffusionParadigmsPipeline.from_pretrained(
... "
runwayml
/stable-diffusion-v1-5", scheduler=scheduler, torch_dtype=torch.float16
... "
stable-diffusion-v1-5
/stable-diffusion-v1-5", scheduler=scheduler, torch_dtype=torch.float16
... )
>>> pipe = pipe.to("cuda")
...
...
@@ -95,8 +97,8 @@ class StableDiffusionParadigmsPipeline(
[`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
"""
...
...
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py
View file @
1b456bd5
...
...
@@ -303,7 +303,8 @@ class StableDiffusionPix2PixZeroPipeline(DiffusionPipeline, StableDiffusionMixin
[`DDIMScheduler`], [`LMSDiscreteScheduler`], [`EulerAncestralDiscreteScheduler`], or [`DDPMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the [model card](https://huggingface.co/runwayml/stable-diffusion-v1-5) for details.
Please, refer to the [model card](https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5) for
details.
feature_extractor ([`CLIPImageProcessor`]):
Model that extracts features from generated images to be used as inputs for the `safety_checker`.
requires_safety_checker (bool):
...
...
src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion.py
View file @
1b456bd5
...
...
@@ -38,8 +38,8 @@ class VersatileDiffusionPipeline(DiffusionPipeline):
[`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
"""
...
...
src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py
View file @
1b456bd5
...
...
@@ -186,8 +186,8 @@ class LatentConsistencyModelImg2ImgPipeline(
supports [`LCMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
requires_safety_checker (`bool`, *optional*, defaults to `True`):
...
...
src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py
View file @
1b456bd5
...
...
@@ -165,8 +165,8 @@ class LatentConsistencyModelPipeline(
supports [`LCMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
requires_safety_checker (`bool`, *optional*, defaults to `True`):
...
...
src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py
View file @
1b456bd5
...
...
@@ -49,7 +49,7 @@ EXAMPLE_DOC_STRING = """
>>> from diffusers.utils import load_image
>>> pipe = LEditsPPPipelineStableDiffusion.from_pretrained(
... "
runwayml
/stable-diffusion-v1-5", variant="fp16", torch_dtype=torch.float16
... "
stable-diffusion-v1-5
/stable-diffusion-v1-5", variant="fp16", torch_dtype=torch.float16
... )
>>> pipe.enable_vae_tiling()
>>> pipe = pipe.to("cuda")
...
...
@@ -381,8 +381,8 @@ class LEditsPPPipelineStableDiffusion(
"The configuration file of the unet has set the default `sample_size` to smaller than"
" 64 which seems highly unlikely. If your checkpoint is a fine-tuned version of any of the"
" following:
\n
- CompVis/stable-diffusion-v1-4
\n
- CompVis/stable-diffusion-v1-3
\n
-"
" CompVis/stable-diffusion-v1-2
\n
- CompVis/stable-diffusion-v1-1
\n
-
runwayml
/stable-diffusion-v1-5"
"
\n
-
runwayml
/stable-diffusion-inpainting
\n
you should change 'sample_size' to 64 in the"
" CompVis/stable-diffusion-v1-2
\n
- CompVis/stable-diffusion-v1-1
\n
-
stable-diffusion-v1-5
/stable-diffusion-v1-5"
"
\n
-
stable-diffusion-v1-5
/stable-diffusion-inpainting
\n
you should change 'sample_size' to 64 in the"
" configuration file. Please make sure to update the config accordingly as leaving `sample_size=32`"
" in the config might lead to incorrect results in future versions. If you have downloaded this"
" checkpoint from the Hugging Face Hub, it would be very nice if you could open a Pull request for"
...
...
src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd.py
View file @
1b456bd5
...
...
@@ -80,7 +80,10 @@ EXAMPLE_DOC_STRING = """
>>> # load control net and stable diffusion v1-5
>>> controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny", torch_dtype=torch.float16)
>>> pipe = AutoPipelineForText2Image.from_pretrained(
... "runwayml/stable-diffusion-v1-5", controlnet=controlnet, torch_dtype=torch.float16, enable_pag=True
... "stable-diffusion-v1-5/stable-diffusion-v1-5",
... controlnet=controlnet,
... torch_dtype=torch.float16,
... enable_pag=True,
... )
>>> # speed up diffusion process with faster scheduler and memory optimization
...
...
@@ -202,8 +205,8 @@ class StableDiffusionControlNetPAGPipeline(
[`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
"""
...
...
src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd_inpaint.py
View file @
1b456bd5
...
...
@@ -93,7 +93,10 @@ EXAMPLE_DOC_STRING = """
... "lllyasviel/control_v11p_sd15_inpaint", torch_dtype=torch.float16
... )
>>> pipe = AutoPipelineForInpainting.from_pretrained(
... "runwayml/stable-diffusion-v1-5", controlnet=controlnet, torch_dtype=torch.float16, enable_pag=True
... "stable-diffusion-v1-5/stable-diffusion-v1-5",
... controlnet=controlnet,
... torch_dtype=torch.float16,
... enable_pag=True,
... )
>>> pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
...
...
@@ -151,10 +154,11 @@ class StableDiffusionControlNetPAGInpaintPipeline(
- [`~loaders.IPAdapterMixin.load_ip_adapter`] for loading IP Adapters
> [!TIP] > This pipeline can be used with checkpoints that have been specifically fine-tuned for inpainting >
([runwayml/stable-diffusion-inpainting](https://huggingface.co/runwayml/stable-diffusion-inpainting)) as well as >
default text-to-image Stable Diffusion checkpoints >
([runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5)). Default text-to-image >
Stable Diffusion checkpoints might be preferable for ControlNets that have been fine-tuned on those, such as >
([stable-diffusion-v1-5/stable-diffusion-inpainting](https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-inpainting))
as well as > default text-to-image Stable Diffusion checkpoints >
([stable-diffusion-v1-5/stable-diffusion-v1-5](https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5)).
Default text-to-image > Stable Diffusion checkpoints might be preferable for ControlNets that have been fine-tuned
on those, such as >
[lllyasviel/control_v11p_sd15_inpaint](https://huggingface.co/lllyasviel/control_v11p_sd15_inpaint).
Args:
...
...
@@ -175,8 +179,8 @@ class StableDiffusionControlNetPAGInpaintPipeline(
[`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
"""
...
...
@@ -1328,7 +1332,7 @@ class StableDiffusionControlNetPAGInpaintPipeline(
# 7.1 Check that sizes of mask, masked image and latents match
if
num_channels_unet
==
9
:
# default case for
runwayml
/stable-diffusion-inpainting
# default case for
stable-diffusion-v1-5
/stable-diffusion-inpainting
num_channels_mask
=
mask
.
shape
[
1
]
num_channels_masked_image
=
masked_image_latents
.
shape
[
1
]
if
num_channels_latents
+
num_channels_mask
+
num_channels_masked_image
!=
self
.
unet
.
config
.
in_channels
:
...
...
src/diffusers/pipelines/pag/pipeline_pag_sd.py
View file @
1b456bd5
...
...
@@ -57,7 +57,7 @@ EXAMPLE_DOC_STRING = """
>>> from diffusers import AutoPipelineForText2Image
>>> pipe = AutoPipelineForText2Image.from_pretrained(
... "
runwayml
/stable-diffusion-v1-5", torch_dtype=torch.float16, enable_pag=True
... "
stable-diffusion-v1-5
/stable-diffusion-v1-5", torch_dtype=torch.float16, enable_pag=True
... )
>>> pipe = pipe.to("cuda")
...
...
@@ -190,8 +190,8 @@ class StableDiffusionPAGPipeline(
[`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
"""
...
...
@@ -272,8 +272,8 @@ class StableDiffusionPAGPipeline(
"The configuration file of the unet has set the default `sample_size` to smaller than"
" 64 which seems highly unlikely. If your checkpoint is a fine-tuned version of any of the"
" following:
\n
- CompVis/stable-diffusion-v1-4
\n
- CompVis/stable-diffusion-v1-3
\n
-"
" CompVis/stable-diffusion-v1-2
\n
- CompVis/stable-diffusion-v1-1
\n
-
runwayml
/stable-diffusion-v1-5"
"
\n
-
runwayml
/stable-diffusion-inpainting
\n
you should change 'sample_size' to 64 in the"
" CompVis/stable-diffusion-v1-2
\n
- CompVis/stable-diffusion-v1-1
\n
-
stable-diffusion-v1-5
/stable-diffusion-v1-5"
"
\n
-
stable-diffusion-v1-5
/stable-diffusion-inpainting
\n
you should change 'sample_size' to 64 in the"
" configuration file. Please make sure to update the config accordingly as leaving `sample_size=32`"
" in the config might lead to incorrect results in future versions. If you have downloaded this"
" checkpoint from the Hugging Face Hub, it would be very nice if you could open a Pull request for"
...
...
src/diffusers/pipelines/pag/pipeline_pag_sd_img2img.py
View file @
1b456bd5
...
...
@@ -61,7 +61,7 @@ EXAMPLE_DOC_STRING = """
>>> from diffusers.utils import load_image
>>> pipe = AutoPipelineForImage2Image.from_pretrained(
... "
runwayml
/stable-diffusion-v1-5",
... "
stable-diffusion-v1-5
/stable-diffusion-v1-5",
... torch_dtype=torch.float16,
... enable_pag=True,
... )
...
...
@@ -185,8 +185,8 @@ class StableDiffusionPAGImg2ImgPipeline(
[`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
"""
...
...
@@ -267,8 +267,8 @@ class StableDiffusionPAGImg2ImgPipeline(
"The configuration file of the unet has set the default `sample_size` to smaller than"
" 64 which seems highly unlikely. If your checkpoint is a fine-tuned version of any of the"
" following:
\n
- CompVis/stable-diffusion-v1-4
\n
- CompVis/stable-diffusion-v1-3
\n
-"
" CompVis/stable-diffusion-v1-2
\n
- CompVis/stable-diffusion-v1-1
\n
-
runwayml
/stable-diffusion-v1-5"
"
\n
-
runwayml
/stable-diffusion-inpainting
\n
you should change 'sample_size' to 64 in the"
" CompVis/stable-diffusion-v1-2
\n
- CompVis/stable-diffusion-v1-1
\n
-
stable-diffusion-v1-5
/stable-diffusion-v1-5"
"
\n
-
stable-diffusion-v1-5
/stable-diffusion-inpainting
\n
you should change 'sample_size' to 64 in the"
" configuration file. Please make sure to update the config accordingly as leaving `sample_size=32`"
" in the config might lead to incorrect results in future versions. If you have downloaded this"
" checkpoint from the Hugging Face Hub, it would be very nice if you could open a Pull request for"
...
...
src/diffusers/pipelines/pag/pipeline_pag_sd_inpaint.py
View file @
1b456bd5
...
...
@@ -58,7 +58,7 @@ EXAMPLE_DOC_STRING = """
>>> from diffusers import AutoPipelineForInpainting
>>> pipe = AutoPipelineForInpainting.from_pretrained(
... "
runwayml
/stable-diffusion-v1-5", torch_dtype=torch.float16, enable_pag=True
... "
stable-diffusion-v1-5
/stable-diffusion-v1-5", torch_dtype=torch.float16, enable_pag=True
... )
>>> pipe = pipe.to("cuda")
>>> img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"
...
...
@@ -217,8 +217,8 @@ class StableDiffusionPAGInpaintPipeline(
[`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
"""
...
...
@@ -299,8 +299,8 @@ class StableDiffusionPAGInpaintPipeline(
"The configuration file of the unet has set the default `sample_size` to smaller than"
" 64 which seems highly unlikely. If your checkpoint is a fine-tuned version of any of the"
" following:
\n
- CompVis/stable-diffusion-v1-4
\n
- CompVis/stable-diffusion-v1-3
\n
-"
" CompVis/stable-diffusion-v1-2
\n
- CompVis/stable-diffusion-v1-1
\n
-
runwayml
/stable-diffusion-v1-5"
"
\n
-
runwayml
/stable-diffusion-inpainting
\n
you should change 'sample_size' to 64 in the"
" CompVis/stable-diffusion-v1-2
\n
- CompVis/stable-diffusion-v1-1
\n
-
stable-diffusion-v1-5
/stable-diffusion-v1-5"
"
\n
-
stable-diffusion-v1-5
/stable-diffusion-inpainting
\n
you should change 'sample_size' to 64 in the"
" configuration file. Please make sure to update the config accordingly as leaving `sample_size=32`"
" in the config might lead to incorrect results in future versions. If you have downloaded this"
" checkpoint from the Hugging Face Hub, it would be very nice if you could open a Pull request for"
...
...
@@ -1183,7 +1183,7 @@ class StableDiffusionPAGInpaintPipeline(
# 8. Check that sizes of mask, masked image and latents match
if
num_channels_unet
==
9
:
# default case for
runwayml
/stable-diffusion-inpainting
# default case for
stable-diffusion-v1-5
/stable-diffusion-inpainting
num_channels_mask
=
mask
.
shape
[
1
]
num_channels_masked_image
=
masked_image_latents
.
shape
[
1
]
if
num_channels_latents
+
num_channels_mask
+
num_channels_masked_image
!=
self
.
unet
.
config
.
in_channels
:
...
...
src/diffusers/pipelines/pag/pipeline_pag_sd_xl_inpaint.py
View file @
1b456bd5
...
...
@@ -1501,7 +1501,7 @@ class StableDiffusionXLPAGInpaintPipeline(
# 8. Check that sizes of mask, masked image and latents match
if
num_channels_unet
==
9
:
# default case for
runwayml
/stable-diffusion-inpainting
# default case for
stable-diffusion-v1-5
/stable-diffusion-inpainting
num_channels_mask
=
mask
.
shape
[
1
]
num_channels_masked_image
=
masked_image_latents
.
shape
[
1
]
if
num_channels_latents
+
num_channels_mask
+
num_channels_masked_image
!=
self
.
unet
.
config
.
in_channels
:
...
...
src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py
View file @
1b456bd5
...
...
@@ -179,8 +179,8 @@ class PaintByExamplePipeline(DeprecatedPipelineMixin, DiffusionPipeline, StableD
[`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
safety_checker ([`StableDiffusionSafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
...
...
src/diffusers/pipelines/semantic_stable_diffusion/pipeline_semantic_stable_diffusion.py
View file @
1b456bd5
...
...
@@ -48,8 +48,8 @@ class SemanticStableDiffusionPipeline(DeprecatedPipelineMixin, DiffusionPipeline
[`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
safety_checker ([`Q16SafetyChecker`]):
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the [model card](https://huggingface.co/
runwayml
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
Please refer to the [model card](https://huggingface.co/
stable-diffusion-v1-5
/stable-diffusion-v1-5) for
more details
about a model's potential harms.
feature_extractor ([`~transformers.CLIPImageProcessor`]):
A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
"""
...
...
@@ -332,7 +332,7 @@ class SemanticStableDiffusionPipeline(DeprecatedPipelineMixin, DiffusionPipeline
>>> from diffusers import SemanticStableDiffusionPipeline
>>> pipe = SemanticStableDiffusionPipeline.from_pretrained(
... "
runwayml
/stable-diffusion-v1-5", torch_dtype=torch.float16
... "
stable-diffusion-v1-5
/stable-diffusion-v1-5", torch_dtype=torch.float16
... )
>>> pipe = pipe.to("cuda")
...
...
src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_inpaint.py
View file @
1b456bd5
...
...
@@ -1247,7 +1247,7 @@ class StableDiffusion3InpaintPipeline(DiffusionPipeline, SD3LoraLoaderMixin, Fro
# match the inpainting pipeline and will be updated with input + mask inpainting model later
if
num_channels_transformer
==
33
:
# default case for
runwayml
/stable-diffusion-inpainting
# default case for
stable-diffusion-v1-5
/stable-diffusion-inpainting
num_channels_mask
=
mask
.
shape
[
1
]
num_channels_masked_image
=
masked_image_latents
.
shape
[
1
]
if
(
...
...
src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py
View file @
1b456bd5
...
...
@@ -1501,7 +1501,7 @@ class StableDiffusionXLInpaintPipeline(
# 8. Check that sizes of mask, masked image and latents match
if
num_channels_unet
==
9
:
# default case for
runwayml
/stable-diffusion-inpainting
# default case for
stable-diffusion-v1-5
/stable-diffusion-inpainting
num_channels_mask
=
mask
.
shape
[
1
]
num_channels_masked_image
=
masked_image_latents
.
shape
[
1
]
if
num_channels_latents
+
num_channels_mask
+
num_channels_masked_image
!=
self
.
unet
.
config
.
in_channels
:
...
...
src/diffusers/utils/hub_utils.py
View file @
1b456bd5
...
...
@@ -113,7 +113,8 @@ def load_or_create_model_card(
Args:
repo_id_or_path (`str`):
The repo id (e.g., "runwayml/stable-diffusion-v1-5") or local path where to look for the model card.
The repo id (e.g., "stable-diffusion-v1-5/stable-diffusion-v1-5") or local path where to look for the model
card.
token (`str`, *optional*):
Authentication token. Will default to the stored token. See https://huggingface.co/settings/token for more
details.
...
...
tests/pipelines/pag/test_pag_sd_inpaint.py
View file @
1b456bd5
...
...
@@ -255,7 +255,7 @@ class StableDiffusionPAGInpaintPipelineFastTests(
@
require_torch_accelerator
class
StableDiffusionPAGPipelineIntegrationTests
(
unittest
.
TestCase
):
pipeline_class
=
StableDiffusionPAGInpaintPipeline
repo_id
=
"
runwayml
/stable-diffusion-v1-5"
repo_id
=
"
stable-diffusion-v1-5
/stable-diffusion-v1-5"
def
setUp
(
self
):
super
().
setUp
()
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment