tolgacangoz commited on
Commit
e218e03
1 Parent(s): 486ddce

Upload matryoshka.py

Browse files
Files changed (1) hide show
  1. matryoshka.py +5 -7
matryoshka.py CHANGED
@@ -4580,12 +4580,10 @@ class MatryoshkaPipeline(
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,4 +4591,4 @@ class MatryoshkaPipeline(
4593
  if not return_dict:
4594
  return (image,)
4595
 
4596
- return MatryoshkaPipelineOutput(images=images)
 
4580
 
4581
  image = latents
4582
 
4583
+ if self.scheduler.scales is not None:
4584
+ image = image[0]
4585
+
4586
+ image = self.image_processor.postprocess(image, output_type=output_type)
 
 
4587
 
4588
  # Offload all models
4589
  self.maybe_free_model_hooks()
 
4591
  if not return_dict:
4592
  return (image,)
4593
 
4594
+ return MatryoshkaPipelineOutput(images=image)