Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files- app.py +1 -1
- models/gen_pipeline.py +1 -1
app.py
CHANGED
@@ -59,7 +59,7 @@ def infer(
|
|
59 |
num_images_per_caption=2,
|
60 |
positive_prompt=positive_prompt,
|
61 |
negative_prompt=negative_prompt,
|
62 |
-
hw=(
|
63 |
cfg=text_cfg,
|
64 |
cfg_img=img_cfg,
|
65 |
cfg_schedule="constant",
|
|
|
59 |
num_images_per_caption=2,
|
60 |
positive_prompt=positive_prompt,
|
61 |
negative_prompt=negative_prompt,
|
62 |
+
hw=(input_image.size[1], input_image.size[0]),
|
63 |
cfg=text_cfg,
|
64 |
cfg_img=img_cfg,
|
65 |
cfg_schedule="constant",
|
models/gen_pipeline.py
CHANGED
@@ -387,7 +387,7 @@ class NextStepPipeline:
|
|
387 |
)
|
388 |
|
389 |
# 7. unpatchify
|
390 |
-
latents = self.model.unpatchify(tokens)
|
391 |
latents = (latents / self.scaling_factor) + self.shift_factor
|
392 |
|
393 |
# 8. decode latents
|
|
|
387 |
)
|
388 |
|
389 |
# 7. unpatchify
|
390 |
+
latents = self.model.unpatchify(tokens, h=hw[0] // self.down_factor, w=hw[1] // self.down_factor)
|
391 |
latents = (latents / self.scaling_factor) + self.shift_factor
|
392 |
|
393 |
# 8. decode latents
|