Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -42,10 +42,11 @@ def generate(slider_x, prompt, seed, recalc_directions, iterations, steps, guida
|
|
42 |
# check if avg diff for directions need to be re-calculated
|
43 |
print("slider_x", slider_x)
|
44 |
print("x_concept_1", x_concept_1, "x_concept_2", x_concept_2)
|
45 |
-
torch.manual_seed(seed)
|
46 |
|
47 |
if not sorted(slider_x) == sorted([x_concept_1, x_concept_2]) or recalc_directions:
|
48 |
-
avg_diff = clip_slider.find_latent_direction(slider_x[0], slider_x[1], num_iterations=iterations).to(torch.float16)
|
|
|
49 |
x_concept_1, x_concept_2 = slider_x[0], slider_x[1]
|
50 |
|
51 |
if img2img_type=="controlnet canny" and img is not None:
|
|
|
42 |
# check if avg diff for directions need to be re-calculated
|
43 |
print("slider_x", slider_x)
|
44 |
print("x_concept_1", x_concept_1, "x_concept_2", x_concept_2)
|
45 |
+
#torch.manual_seed(seed)
|
46 |
|
47 |
if not sorted(slider_x) == sorted([x_concept_1, x_concept_2]) or recalc_directions:
|
48 |
+
#avg_diff = clip_slider.find_latent_direction(slider_x[0], slider_x[1], num_iterations=iterations).to(torch.float16)
|
49 |
+
avg_diff = clip_slider.find_latent_direction(slider_x[0], slider_x[1], num_iterations=iterations)
|
50 |
x_concept_1, x_concept_2 = slider_x[0], slider_x[1]
|
51 |
|
52 |
if img2img_type=="controlnet canny" and img is not None:
|