Update app_demo.py
Browse files- app_demo.py +6 -5
app_demo.py
CHANGED
@@ -31,6 +31,7 @@ DTYPE = torch.float32 # torch.float16 works as well, but pictures seem to be a
|
|
31 |
|
32 |
|
33 |
#"SimianLuo/LCM_Dreamshaper_v7"
|
|
|
34 |
pipe = DiffusionPipeline.from_pretrained( "SimianLuo/LCM_Dreamshaper_v7" , custom_pipeline="SimianLuo/LCM_Dreamshaper_v7",
|
35 |
custom_revision="main",
|
36 |
low_cpu_mem_usage=True,
|
@@ -40,16 +41,16 @@ pipe = DiffusionPipeline.from_pretrained( "SimianLuo/LCM_Dreamshaper_v7" ,
|
|
40 |
#pipe.to(torch_device="cpu",torch_dtype="float16", torch_dtype=DTYPE)
|
41 |
pipe.to(torch_dtype="float32" )
|
42 |
pipe.to("cpu")
|
43 |
-
|
44 |
|
45 |
#from diffusers import StableDiffusionPipeline
|
46 |
|
47 |
model_id = "SimianLuo/LCM_Dreamshaper_v7"
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
|
54 |
|
55 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
|
|
31 |
|
32 |
|
33 |
#"SimianLuo/LCM_Dreamshaper_v7"
|
34 |
+
'''
|
35 |
pipe = DiffusionPipeline.from_pretrained( "SimianLuo/LCM_Dreamshaper_v7" , custom_pipeline="SimianLuo/LCM_Dreamshaper_v7",
|
36 |
custom_revision="main",
|
37 |
low_cpu_mem_usage=True,
|
|
|
41 |
#pipe.to(torch_device="cpu",torch_dtype="float16", torch_dtype=DTYPE)
|
42 |
pipe.to(torch_dtype="float32" )
|
43 |
pipe.to("cpu")
|
44 |
+
'''
|
45 |
|
46 |
#from diffusers import StableDiffusionPipeline
|
47 |
|
48 |
model_id = "SimianLuo/LCM_Dreamshaper_v7"
|
49 |
|
50 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id,)
|
51 |
+
prompt = "A futuristic cityscape at sunset"
|
52 |
+
image = pipeline(prompt).images[0]
|
53 |
+
image.show()
|
54 |
|
55 |
|
56 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|