Spaces:
Runtime error
Runtime error
Commit
·
27a0683
1
Parent(s):
c331654
Update app.py
Browse files
app.py
CHANGED
@@ -46,15 +46,16 @@ def infer(prompt, sd_options, seed, b1, b2, s1, s2):
|
|
46 |
pip = pip_2_1
|
47 |
else:
|
48 |
pip = pip_1_4
|
49 |
-
|
50 |
-
|
|
|
51 |
|
52 |
torch.manual_seed(seed)
|
53 |
print("Generating SD:")
|
54 |
sd_image = pip(prompt, num_inference_steps=25).images[0]
|
55 |
|
56 |
-
|
57 |
-
|
58 |
|
59 |
torch.manual_seed(seed)
|
60 |
print("Generating FreeU:")
|
|
|
46 |
pip = pip_2_1
|
47 |
else:
|
48 |
pip = pip_1_4
|
49 |
+
|
50 |
+
register_free_upblock2d(pip, b1=1.0, b2=1.0, s1=1.0, s2=1.0)
|
51 |
+
register_free_crossattn_upblock2d(pip, b1=1.0, b2=1.0, s1=1.0, s2=1.0)
|
52 |
|
53 |
torch.manual_seed(seed)
|
54 |
print("Generating SD:")
|
55 |
sd_image = pip(prompt, num_inference_steps=25).images[0]
|
56 |
|
57 |
+
register_free_upblock2d(pip, b1=b1, b2=b2, s1=s1, s2=s1)
|
58 |
+
register_free_crossattn_upblock2d(pip, b1=b1, b2=b2, s1=s1, s2=s1)
|
59 |
|
60 |
torch.manual_seed(seed)
|
61 |
print("Generating FreeU:")
|