Spaces:
Running
on
Zero
Running
on
Zero
Update clip_slider_pipeline.py
Browse files- clip_slider_pipeline.py +4 -1
clip_slider_pipeline.py
CHANGED
|
@@ -20,7 +20,10 @@ class CLIPSlider:
|
|
| 20 |
self.device = device
|
| 21 |
self.pipe = sd_pipe.to(self.device)
|
| 22 |
self.iterations = iterations
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
| 24 |
if target_word_2nd != "" or opposite_2nd != "":
|
| 25 |
self.avg_diff_2nd = self.find_latent_direction(target_word_2nd, opposite_2nd)
|
| 26 |
else:
|
|
|
|
| 20 |
self.device = device
|
| 21 |
self.pipe = sd_pipe.to(self.device)
|
| 22 |
self.iterations = iterations
|
| 23 |
+
if target_word != "" or opposite != "":
|
| 24 |
+
self.avg_diff = self.find_latent_direction(target_word, opposite)
|
| 25 |
+
else:
|
| 26 |
+
self.avg_diff = None
|
| 27 |
if target_word_2nd != "" or opposite_2nd != "":
|
| 28 |
self.avg_diff_2nd = self.find_latent_direction(target_word_2nd, opposite_2nd)
|
| 29 |
else:
|