Spaces:
Runtime error
Runtime error
Commit
·
2c72ac4
1
Parent(s):
80269a9
Update app.py
Browse files
app.py
CHANGED
@@ -6,27 +6,8 @@ from diffusers import StableDiffusionPipeline
|
|
6 |
from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d
|
7 |
|
8 |
|
9 |
-
#
|
10 |
-
|
11 |
-
# elif sd_options == 'SD2.1':
|
12 |
-
# model = "stabilityai/stable-diffusion-2-1"
|
13 |
-
# else:
|
14 |
-
# model = "CompVis/stable-diffusion-v1-4"
|
15 |
-
|
16 |
-
torch.manual_seed(42)
|
17 |
-
model_id = "CompVis/stable-diffusion-v1-4"
|
18 |
-
|
19 |
-
# pip_sd = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
20 |
-
# pip_sd = pip_sd.to("cuda")
|
21 |
-
|
22 |
-
# pip_freeu = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
23 |
-
# pip_freeu = pip_freeu.to("cuda")
|
24 |
-
# # -------- freeu block registration
|
25 |
-
# register_free_upblock2d(pip_freeu, b1=1.2, b2=1.4, s1=0.9, s2=0.2)
|
26 |
-
# register_free_crossattn_upblock2d(pip_freeu, b1=1.2, b2=1.4, s1=0.9, s2=0.2)
|
27 |
-
# # -------- freeu block registration
|
28 |
-
|
29 |
-
model_id = "CompVis/stable-diffusion-v1-4"
|
30 |
pip_1_4 = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
31 |
pip_1_4 = pip_1_4.to("cuda")
|
32 |
|
|
|
6 |
from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d
|
7 |
|
8 |
|
9 |
+
# model_id = "CompVis/stable-diffusion-v1-4"
|
10 |
+
model_id = "stable-diffusion-v1-4"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
pip_1_4 = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
12 |
pip_1_4 = pip_1_4.to("cuda")
|
13 |
|