Skip to content

Commit dd25ef5

Browse files
jgyfutubkashif
andauthored
[Hacktoberfest]Fixing issues huggingface#5241 (huggingface#5255)
* Update pipeline_wuerstchen_prior.py * prior_num_inference_steps updated * height, width, num_inference_steps, and guidance_scale synced * parameters synced * latent_mean, latent_std, and resolution_multiple synced * prior_num_inference_steps changed * Formatted pipeline_wuerstchen_prior.py * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py --------- Co-authored-by: Kashif Rasul <[email protected]>
1 parent 0168667 commit dd25ef5

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,13 @@ def __call__(
213213
Image Embeddings either extracted from an image or generated by a Prior Model.
214214
prompt (`str` or `List[str]`):
215215
The prompt or prompts to guide the image generation.
216-
num_inference_steps (`int`, *optional*, defaults to 30):
216+
num_inference_steps (`int`, *optional*, defaults to 12):
217217
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
218218
expense of slower inference.
219219
timesteps (`List[int]`, *optional*):
220220
Custom timesteps to use for the denoising process. If not defined, equal spaced `num_inference_steps`
221221
timesteps are used. Must be in descending order.
222-
guidance_scale (`float`, *optional*, defaults to 4.0):
222+
guidance_scale (`float`, *optional*, defaults to 0.0):
223223
Guidance scale as defined in [Classifier-Free Diffusion Guidance](https://arxiv.org/abs/2207.12598).
224224
`decoder_guidance_scale` is defined as `w` of equation 2. of [Imagen
225225
Paper](https://arxiv.org/pdf/2205.11487.pdf). Guidance scale is enabled by setting

src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def __call__(
194194
Paper](https://arxiv.org/pdf/2205.11487.pdf). Guidance scale is enabled by setting
195195
`prior_guidance_scale > 1`. Higher guidance scale encourages to generate images that are closely linked
196196
to the text `prompt`, usually at the expense of lower image quality.
197-
prior_num_inference_steps (`Union[int, Dict[float, int]]`, *optional*, defaults to 30):
197+
prior_num_inference_steps (`Union[int, Dict[float, int]]`, *optional*, defaults to 60):
198198
The number of prior denoising steps. More denoising steps usually lead to a higher quality image at the
199199
expense of slower inference. For more specific timestep spacing, you can pass customized
200200
`prior_timesteps`

src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ class WuerstchenPriorPipeline(DiffusionPipeline):
8282
[CLIPTokenizer](https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer).
8383
scheduler ([`DDPMWuerstchenScheduler`]):
8484
A scheduler to be used in combination with `prior` to generate image embedding.
85+
latent_mean ('float', *optional*, defaults to 42.0):
86+
Mean value for latent diffusers.
87+
latent_std ('float', *optional*, defaults to 1.0):
88+
Standard value for latent diffusers.
89+
resolution_multiple ('float', *optional*, defaults to 42.67):
90+
Default resolution for multiple images generated.
8591
"""
8692

8793
model_cpu_offload_seq = "text_encoder->prior"
@@ -282,17 +288,17 @@ def __call__(
282288
Args:
283289
prompt (`str` or `List[str]`):
284290
The prompt or prompts to guide the image generation.
285-
height (`int`, *optional*, defaults to 512):
291+
height (`int`, *optional*, defaults to 1024):
286292
The height in pixels of the generated image.
287-
width (`int`, *optional*, defaults to 512):
293+
width (`int`, *optional*, defaults to 1024):
288294
The width in pixels of the generated image.
289-
num_inference_steps (`int`, *optional*, defaults to 30):
295+
num_inference_steps (`int`, *optional*, defaults to 60):
290296
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
291297
expense of slower inference.
292298
timesteps (`List[int]`, *optional*):
293299
Custom timesteps to use for the denoising process. If not defined, equal spaced `num_inference_steps`
294300
timesteps are used. Must be in descending order.
295-
guidance_scale (`float`, *optional*, defaults to 4.0):
301+
guidance_scale (`float`, *optional*, defaults to 8.0):
296302
Guidance scale as defined in [Classifier-Free Diffusion Guidance](https://arxiv.org/abs/2207.12598).
297303
`decoder_guidance_scale` is defined as `w` of equation 2. of [Imagen
298304
Paper](https://arxiv.org/pdf/2205.11487.pdf). Guidance scale is enabled by setting

0 commit comments

Comments
 (0)