tolgacangoz
commited on
Commit
•
ca2710e
1
Parent(s):
d09d4a5
Upload matryoshka.py
Browse files- unet/matryoshka.py +7 -5
unet/matryoshka.py
CHANGED
@@ -4580,10 +4580,12 @@ class MatryoshkaPipeline(
|
|
4580 |
|
4581 |
image = latents
|
4582 |
|
4583 |
-
if self.scheduler.scales is not None:
|
4584 |
-
|
4585 |
-
|
4586 |
-
|
|
|
|
|
4587 |
|
4588 |
# Offload all models
|
4589 |
self.maybe_free_model_hooks()
|
@@ -4591,4 +4593,4 @@ class MatryoshkaPipeline(
|
|
4591 |
if not return_dict:
|
4592 |
return (image,)
|
4593 |
|
4594 |
-
return MatryoshkaPipelineOutput(images=
|
|
|
4580 |
|
4581 |
image = latents
|
4582 |
|
4583 |
+
# if self.scheduler.scales is not None:
|
4584 |
+
# image = image[0]
|
4585 |
+
images = []
|
4586 |
+
for img in image:
|
4587 |
+
images.append(self.image_processor.postprocess(img, output_type=output_type))
|
4588 |
+
# image = self.image_processor.postprocess(image, output_type=output_type)
|
4589 |
|
4590 |
# Offload all models
|
4591 |
self.maybe_free_model_hooks()
|
|
|
4593 |
if not return_dict:
|
4594 |
return (image,)
|
4595 |
|
4596 |
+
return MatryoshkaPipelineOutput(images=images)
|