Skip to content

Commit 9779237

Browse files
committed
more review fixes
1 parent 17733ce commit 9779237

19 files changed

+50
-69
lines changed

src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ def __call__(
228228
229229
Returns:
230230
[`~pipelines.ImagePipelineOutput`] or `tuple`:
231-
If `return_dict` is `True`, [`~pipelines.utils.ImagePipelineOutput`] is returned, otherwise a `tuple`
232-
is returned where the first element is a list with the generated images.
231+
If `return_dict` is `True`, [`~pipelines.ImagePipelineOutput`] is returned, otherwise a `tuple` is
232+
returned where the first element is a list with the generated images.
233233
"""
234234
# 0. Prepare call parameters
235235
img_size = self.unet.config.sample_size

src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,35 +136,32 @@ def __init__(
136136
# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline.enable_vae_slicing
137137
def enable_vae_slicing(self):
138138
r"""
139-
Enable sliced VAE decoding.
140-
141-
When this option is enabled, the VAE will split the input tensor in slices to compute decoding in several
142-
steps. This is useful to save some memory and allow larger batch sizes.
139+
Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
140+
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.
143141
"""
144142
self.vae.enable_slicing()
145143

146144
# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline.disable_vae_slicing
147145
def disable_vae_slicing(self):
148146
r"""
149-
Disable sliced VAE decoding. If `enable_vae_slicing` was previously invoked, this method will go back to
147+
Disable sliced VAE decoding. If `enable_vae_slicing` was previously enabled, this method will go back to
150148
computing decoding in one step.
151149
"""
152150
self.vae.disable_slicing()
153151

154152
# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline.enable_vae_tiling
155153
def enable_vae_tiling(self):
156154
r"""
157-
Enable tiled VAE decoding.
158-
159-
When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and encoding in
160-
several steps. This is useful to save a large amount of memory and to allow the processing of larger images.
155+
Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
156+
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
157+
processing larger images.
161158
"""
162159
self.vae.enable_tiling()
163160

164161
# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline.disable_vae_tiling
165162
def disable_vae_tiling(self):
166163
r"""
167-
Disable tiled VAE decoding. If `enable_vae_tiling` was previously invoked, this method will go back to
164+
Disable tiled VAE decoding. If `enable_vae_tiling` was previously enabled, this method will go back to
168165
computing decoding in one step.
169166
"""
170167
self.vae.disable_tiling()

src/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def __call__(
9494
9595
Returns:
9696
[`~pipelines.AudioPipelineOutput`] or `tuple`:
97-
If `return_dict` is `True`, [`~pipelines.utils.AudioPipelineOutput`] is returned, otherwise a `tuple`
98-
is returned where the first element is a list with the generated audio.
97+
If `return_dict` is `True`, [`~pipelines.AudioPipelineOutput`] is returned, otherwise a `tuple` is
98+
returned where the first element is a list with the generated audio.
9999
"""
100100

101101
if audio_length_in_s is None:

src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def __call__(
103103
output_type (`str`, *optional*, defaults to `"pil"`):
104104
The output format of the generated image. Choose between `PIL.Image` or `np.array`.
105105
return_dict (`bool`, *optional*, defaults to `True`):
106-
Whether or not to return a [`~ImagePipelineOutput`] instead of a plain tuple.
106+
Whether or not to return a [`ImagePipelineOutput`] instead of a plain tuple.
107107
108108
Example:
109109

src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def __call__(
9494
output_type (`str`, *optional*, defaults to `"pil"`):
9595
The output format of the generated image. Choose between `PIL.Image` or `np.array`.
9696
return_dict (`bool`, *optional*, defaults to `True`):
97-
Whether or not to return a [`~ImagePipelineOutput`] instead of a plain tuple.
97+
Whether or not to return a [`ImagePipelineOutput`] instead of a plain tuple.
9898
9999
Example:
100100

src/diffusers/pipelines/pndm/pipeline_pndm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def __call__(
9191
9292
Returns:
9393
[`~pipelines.ImagePipelineOutput`] or `tuple`:
94-
If `return_dict` is `True`, [`~pipelines.utils.ImagePipelineOutput`] is returned, otherwise a `tuple`
95-
is returned where the first element is a list with the generated images.
94+
If `return_dict` is `True`, [`~pipelines.ImagePipelineOutput`] is returned, otherwise a `tuple` is
95+
returned where the first element is a list with the generated images.
9696
"""
9797
# For more information on the sampling method you can take a look at Algorithm 2 of
9898
# the official paper: https://arxiv.org/pdf/2202.09778.pdf

src/diffusers/pipelines/repaint/pipeline_repaint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ def __call__(
180180
181181
Returns:
182182
[`~pipelines.ImagePipelineOutput`] or `tuple`:
183-
If `return_dict` is `True`, [`~pipelines.utils.ImagePipelineOutput`] is returned, otherwise a `tuple`
184-
is returned where the first element is a list with the generated images.
183+
If `return_dict` is `True`, [`~pipelines.ImagePipelineOutput`] is returned, otherwise a `tuple` is
184+
returned where the first element is a list with the generated images.
185185
"""
186186

187187
original_image = image

src/diffusers/pipelines/score_sde_ve/pipeline_score_sde_ve.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ def __call__(
6868
6969
Returns:
7070
[`~pipelines.ImagePipelineOutput`] or `tuple`:
71-
If `return_dict` is `True`, [`~pipelines.utils.ImagePipelineOutput`] is returned, otherwise a `tuple`
72-
is returned where the first element is a list with the generated images.
71+
If `return_dict` is `True`, [`~pipelines.ImagePipelineOutput`] is returned, otherwise a `tuple` is
72+
returned where the first element is a list with the generated images.
7373
"""
7474

7575
img_size = self.unet.config.sample_size

src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,7 @@ def __call__(
598598
Returns:
599599
[`~pipelines.stable_diffusion.StableDiffusionPipelineOutput`] or `tuple`:
600600
If `return_dict` is `True`, [`~pipelines.stable_diffusion.StableDiffusionPipelineOutput`] is returned,
601-
otherwise a `tuple` is returned where the first element is a list with the generated images and the
602-
second element is a list of `bool`s indicating whether the corresponding generated image contains
603-
"not-safe-for-work" (nsfw) content.
601+
otherwise a `tuple` is returned where the first element is a list with the generated images.
604602
"""
605603
# 1. Check inputs
606604
self.check_inputs(

src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,7 @@ def __call__(
357357
Returns:
358358
[`~pipelines.stable_diffusion.StableDiffusionPipelineOutput`] or `tuple`:
359359
If `return_dict` is `True`, [`~pipelines.stable_diffusion.StableDiffusionPipelineOutput`] is returned,
360-
otherwise a `tuple` is returned where the first element is a list with the generated images and the
361-
second element is a list of `bool`s indicating whether the corresponding generated image contains
362-
"not-safe-for-work" (nsfw) content.
360+
otherwise a `tuple` is returned where the first element is a list with the generated images.
363361
"""
364362

365363
# 1. Check inputs

0 commit comments

Comments
 (0)