Spaces:
Runtime error
Runtime error
Update composable_stable_diffusion_pipeline.py
Browse files
composable_stable_diffusion_pipeline.py
CHANGED
|
@@ -328,7 +328,7 @@ class ComposableStableDiffusionPipeline(DiffusionPipeline):
|
|
| 328 |
|
| 329 |
# perform guidance
|
| 330 |
if do_classifier_free_guidance:
|
| 331 |
-
noise_pred_uncond = noise_preds[~mask] * neg_weights
|
| 332 |
noise_pred_text = (noise_preds[mask] * pos_weights).sum(dim=0, keepdims=True)
|
| 333 |
noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
|
| 334 |
|
|
|
|
| 328 |
|
| 329 |
# perform guidance
|
| 330 |
if do_classifier_free_guidance:
|
| 331 |
+
noise_pred_uncond = (noise_preds[~mask] * neg_weights).sum(dim=0, keepdims=True)
|
| 332 |
noise_pred_text = (noise_preds[mask] * pos_weights).sum(dim=0, keepdims=True)
|
| 333 |
noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
|
| 334 |
|