Update app_demo.py
Browse files- app_demo.py +8 -1
app_demo.py
CHANGED
@@ -19,7 +19,7 @@ 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 |
'''
|
21 |
if not torch.cuda.is_available():
|
22 |
-
DESCRIPTION += "\n<
|
23 |
|
24 |
MAX_SEED = np.iinfo(np.int32).max
|
25 |
CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES") == "1"
|
@@ -114,6 +114,13 @@ with gr.Blocks(css="style.css") as demo:
|
|
114 |
elem_id="duplicate-button",
|
115 |
visible=os.getenv("SHOW_DUPLICATE_BUTTON") == "1",
|
116 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
with gr.Group():
|
118 |
with gr.Row():
|
119 |
prompt = gr.Text(
|
|
|
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 |
'''
|
21 |
if not torch.cuda.is_available():
|
22 |
+
DESCRIPTION += "\n<p>running on CPU.</p>"
|
23 |
|
24 |
MAX_SEED = np.iinfo(np.int32).max
|
25 |
CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES") == "1"
|
|
|
114 |
elem_id="duplicate-button",
|
115 |
visible=os.getenv("SHOW_DUPLICATE_BUTTON") == "1",
|
116 |
)
|
117 |
+
gr.HTML(
|
118 |
+
f"""
|
119 |
+
<p id="project-links" align="center">
|
120 |
+
<a href='https://huggingface.co/spaces/charliebaby2023/Fast_Stable_diffusion_CPU/edit/main/app_demo.py'>Edit this py file</a>
|
121 |
+
</p>
|
122 |
+
"""
|
123 |
+
)
|
124 |
with gr.Group():
|
125 |
with gr.Row():
|
126 |
prompt = gr.Text(
|