Update app_demo.py
Browse files- app_demo.py +3 -3
app_demo.py
CHANGED
@@ -14,7 +14,7 @@ from safetensors.torch import load_file
|
|
14 |
from concurrent.futures import ThreadPoolExecutor
|
15 |
import uuid
|
16 |
#import cv2
|
17 |
-
|
18 |
DESCRIPTION = '''# Fast Stable Diffusion CPU with Latent Consistency Model
|
19 |
Distilled from [Dreamshaper v7](https://huggingface.co/Lykon/dreamshaper-7) fine-tune of [Stable Diffusion v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) with only 4,000 training iterations (~32 A100 GPU Hours). [Project page](https://latent-consistency-models.github.io)
|
20 |
'''
|
@@ -32,7 +32,7 @@ DTYPE = torch.float32 # torch.float16 works as well, but pictures seem to be a
|
|
32 |
|
33 |
#"SimianLuo/LCM_Dreamshaper_v7"
|
34 |
'''
|
35 |
-
pipe = DiffusionPipeline.from_pretrained(
|
36 |
custom_revision="main",
|
37 |
low_cpu_mem_usage=True,
|
38 |
safety_checker= None,
|
@@ -45,7 +45,7 @@ pipe.to("cpu")
|
|
45 |
|
46 |
#from diffusers import StableDiffusionPipeline
|
47 |
|
48 |
-
|
49 |
|
50 |
pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
51 |
prompt = "A futuristic cityscape at sunset"
|
|
|
14 |
from concurrent.futures import ThreadPoolExecutor
|
15 |
import uuid
|
16 |
#import cv2
|
17 |
+
model_id = "Lykon/dreamshaper-7" #"openskyml/lcm-lora-sdxl-turbo" #"SimianLuo/LCM_Dreamshaper_v7"
|
18 |
DESCRIPTION = '''# Fast Stable Diffusion CPU with Latent Consistency Model
|
19 |
Distilled from [Dreamshaper v7](https://huggingface.co/Lykon/dreamshaper-7) fine-tune of [Stable Diffusion v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) with only 4,000 training iterations (~32 A100 GPU Hours). [Project page](https://latent-consistency-models.github.io)
|
20 |
'''
|
|
|
32 |
|
33 |
#"SimianLuo/LCM_Dreamshaper_v7"
|
34 |
'''
|
35 |
+
pipe = DiffusionPipeline.from_pretrained( model_id , custom_pipeline=model_id,
|
36 |
custom_revision="main",
|
37 |
low_cpu_mem_usage=True,
|
38 |
safety_checker= None,
|
|
|
45 |
|
46 |
#from diffusers import StableDiffusionPipeline
|
47 |
|
48 |
+
|
49 |
|
50 |
pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
51 |
prompt = "A futuristic cityscape at sunset"
|