Update app_demo.py
Browse files- app_demo.py +4 -4
app_demo.py
CHANGED
@@ -17,8 +17,8 @@ model_id = "Lykon/dreamshaper-xl-v2-turbo"
|
|
17 |
#DESCRIPTION = '''# Fast Stable Diffusion CPU with Latent Consistency Model
|
18 |
#Distilled from [Dreamshaper v7](https://huggingface.co/Lykon/dreamshaper-7) fine‑tune of SD v1-5.
|
19 |
#'''
|
20 |
-
if not torch.cuda.is_available():
|
21 |
-
DESCRIPTION += "\n<p>running on CPU.</p>"
|
22 |
MAX_SEED = np.iinfo(np.int32).max
|
23 |
CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES") == "1"
|
24 |
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "768"))
|
@@ -197,11 +197,11 @@ with gr.Blocks() as demo:
|
|
197 |
<p id="project-links" align="center">
|
198 |
<a href='https://huggingface.co/spaces/charliebaby2023/Fast_Stable_diffusion_CPU/edit/main/app_demo.py'>Edit this app_demo py file</a>
|
199 |
<p> this is currently running the Lykon/dreamshaper-xl-v2-turbo model</p>
|
200 |
-
|
201 |
</p>
|
202 |
"""
|
203 |
)
|
204 |
-
gr.Markdown(DESCRIPTION)
|
205 |
def update_models(hfuser):
|
206 |
if hfuser:
|
207 |
models = validate_and_list_models(hfuser)
|
|
|
17 |
#DESCRIPTION = '''# Fast Stable Diffusion CPU with Latent Consistency Model
|
18 |
#Distilled from [Dreamshaper v7](https://huggingface.co/Lykon/dreamshaper-7) fine‑tune of SD v1-5.
|
19 |
#'''
|
20 |
+
#if not torch.cuda.is_available():
|
21 |
+
#DESCRIPTION += "\n<p>running on CPU.</p>"
|
22 |
MAX_SEED = np.iinfo(np.int32).max
|
23 |
CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES") == "1"
|
24 |
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "768"))
|
|
|
197 |
<p id="project-links" align="center">
|
198 |
<a href='https://huggingface.co/spaces/charliebaby2023/Fast_Stable_diffusion_CPU/edit/main/app_demo.py'>Edit this app_demo py file</a>
|
199 |
<p> this is currently running the Lykon/dreamshaper-xl-v2-turbo model</p>
|
200 |
+
<p><fast stable diffusion, CPU</p>
|
201 |
</p>
|
202 |
"""
|
203 |
)
|
204 |
+
#gr.Markdown(DESCRIPTION)
|
205 |
def update_models(hfuser):
|
206 |
if hfuser:
|
207 |
models = validate_and_list_models(hfuser)
|