Update src/pipeline.py
Browse files- src/pipeline.py +1 -1
src/pipeline.py
CHANGED
|
@@ -77,7 +77,7 @@ def decode_latents_to_image(latents, height: int, width: int, vae):
|
|
| 77 |
traced_vae_decode = trace_and_save_vae_decoder(vae, latents)
|
| 78 |
|
| 79 |
with torch.no_grad():
|
| 80 |
-
latents = FluxPipeline._unpack_latents(latents, height, width, vae_scale_factor)
|
| 81 |
latents = (latents / vae.config.scaling_factor) + vae.config.shift_factor
|
| 82 |
image = traced_vae_decode(latents, return_dict=False)[0] # Use the traced function
|
| 83 |
decoded_image = image_processor.postprocess(image, output_type="pil")[0]
|
|
|
|
| 77 |
traced_vae_decode = trace_and_save_vae_decoder(vae, latents)
|
| 78 |
|
| 79 |
with torch.no_grad():
|
| 80 |
+
latents = FluxPipeline._unpack_latents(latents.unsqueeze(0), height, width, vae_scale_factor)
|
| 81 |
latents = (latents / vae.config.scaling_factor) + vae.config.shift_factor
|
| 82 |
image = traced_vae_decode(latents, return_dict=False)[0] # Use the traced function
|
| 83 |
decoded_image = image_processor.postprocess(image, output_type="pil")[0]
|