Update pipeline.py
Browse files- pipeline.py +4 -6
pipeline.py
CHANGED
|
@@ -854,18 +854,16 @@ class LibreFluxControlNetPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSi
|
|
| 854 |
current_prompt_embeds = torch.cat([negative_prompt_embeds, prompt_embeds])
|
| 855 |
current_pooled_embeds = torch.cat([negative_pooled_prompt_embeds, pooled_prompt_embeds])
|
| 856 |
current_attention_mask = torch.cat([negative_attention_mask, attention_mask])
|
| 857 |
-
|
| 858 |
-
|
| 859 |
-
current_text_ids = torch.cat([negative_text_ids, text_ids])
|
| 860 |
-
current_img_ids = torch.cat([latent_image_ids] * 2)
|
| 861 |
current_control_image = torch.cat([control_image] * 2) if isinstance(control_image, torch.Tensor) else [torch.cat([c_img] * 2) for c_img in control_image]
|
| 862 |
else:
|
| 863 |
latent_model_input = latents
|
| 864 |
current_prompt_embeds = prompt_embeds
|
| 865 |
current_pooled_embeds = pooled_prompt_embeds
|
| 866 |
current_attention_mask = attention_mask
|
| 867 |
-
current_text_ids = text_ids
|
| 868 |
-
current_img_ids = latent_image_ids
|
| 869 |
current_control_image = control_image
|
| 870 |
|
| 871 |
# FIX: Integrate with device handling
|
|
|
|
| 854 |
current_prompt_embeds = torch.cat([negative_prompt_embeds, prompt_embeds])
|
| 855 |
current_pooled_embeds = torch.cat([negative_pooled_prompt_embeds, pooled_prompt_embeds])
|
| 856 |
current_attention_mask = torch.cat([negative_attention_mask, attention_mask])
|
| 857 |
+
current_text_ids = text_ids[0]
|
| 858 |
+
current_img_ids = latent_image_ids[0]
|
|
|
|
|
|
|
| 859 |
current_control_image = torch.cat([control_image] * 2) if isinstance(control_image, torch.Tensor) else [torch.cat([c_img] * 2) for c_img in control_image]
|
| 860 |
else:
|
| 861 |
latent_model_input = latents
|
| 862 |
current_prompt_embeds = prompt_embeds
|
| 863 |
current_pooled_embeds = pooled_prompt_embeds
|
| 864 |
current_attention_mask = attention_mask
|
| 865 |
+
current_text_ids = text_ids[0]
|
| 866 |
+
current_img_ids = latent_image_ids[0]
|
| 867 |
current_control_image = control_image
|
| 868 |
|
| 869 |
# FIX: Integrate with device handling
|