@@ -228,8 +228,6 @@ def get_control_start_end(self, control_guidance_start, control_guidance_end):
228
228
def __call__ (
229
229
self ,
230
230
prompt : Union [str , List [str ]] = None ,
231
- height : Optional [int ] = None ,
232
- width : Optional [int ] = None ,
233
231
num_inference_steps : int = 30 ,
234
232
timesteps : List [int ] = None ,
235
233
guidance_scale : float = 3.5 ,
@@ -259,10 +257,6 @@ def __call__(
259
257
prompt (`str` or `List[str]`, *optional*):
260
258
The prompt or prompts to guide the image generation. If not defined, one has to pass `prompt_embeds`.
261
259
instead.
262
- height (`int`, *optional*, defaults to self.unet.config.sample_size * self.vae_scale_factor):
263
- The height in pixels of the generated image. This is set to 1024 by default for the best results.
264
- width (`int`, *optional*, defaults to self.unet.config.sample_size * self.vae_scale_factor):
265
- The width in pixels of the generated image. This is set to 1024 by default for the best results.
266
260
num_inference_steps (`int`, *optional*, defaults to 50):
267
261
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
268
262
expense of slower inference.
@@ -323,8 +317,6 @@ def __call__(
323
317
`tuple`. When returning a tuple, the first element is a list with the generated images.
324
318
"""
325
319
326
- height = height or self .default_sample_size * self .vae_scale_factor
327
- width = width or self .default_sample_size * self .vae_scale_factor
328
320
control_guidance_start , control_guidance_end = self .get_control_start_end (
329
321
control_guidance_start = control_guidance_start , control_guidance_end = control_guidance_end
330
322
)
@@ -335,8 +327,6 @@ def __call__(
335
327
)
336
328
self .check_inputs (
337
329
prompt ,
338
- height ,
339
- width ,
340
330
negative_prompt = negative_prompt ,
341
331
prompt_embeds = prompt_embeds ,
342
332
negative_prompt_embeds = negative_prompt_embeds ,
@@ -517,7 +507,7 @@ def __call__(
517
507
order = 1 ,
518
508
total_steps = num_inference_steps ,
519
509
timestep = int (t ),
520
- latents = latents . view ( 1 , 64 , 64 , 4 , 2 , 2 ). permute ( 0 , 3 , 1 , 4 , 2 , 5 ). reshape ( 1 , 4 , 128 , 128 ),
510
+ latents = self . _unpack_latents ( latents , height , width , self . vae_scale_factor ),
521
511
),
522
512
)
523
513
0 commit comments