Spaces:
Running
on
Zero
Running
on
Zero
alfredplpl
commited on
Commit
·
0a12c49
1
Parent(s):
6298b11
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import os
|
|
7 |
from huggingface_hub import hf_hub_download
|
8 |
import torch
|
9 |
from torch import autocast
|
10 |
-
from diffusers import StableDiffusionXLPipeline,
|
11 |
from safetensors import safe_open
|
12 |
from compel import Compel, ReturnedEmbeddingsType
|
13 |
from safetensors.torch import load_file
|
@@ -15,9 +15,12 @@ from safetensors.torch import load_file
|
|
15 |
model_id = 'aipicasso/emi-stable'
|
16 |
auth_token=os.environ["ACCESS_TOKEN"]
|
17 |
|
|
|
|
|
18 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
19 |
model_id,
|
20 |
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
|
|
21 |
use_auth_token=auth_token)
|
22 |
|
23 |
|
@@ -116,7 +119,7 @@ with gr.Blocks(css=css) as demo:
|
|
116 |
f"""
|
117 |
<div class="main-div">
|
118 |
<div>
|
119 |
-
<h1>Emi Stable</h1>
|
120 |
<!--
|
121 |
<h2>
|
122 |
Other Demos:
|
@@ -129,7 +132,6 @@ with gr.Blocks(css=css) as demo:
|
|
129 |
</div>
|
130 |
<p>
|
131 |
Demo for Emi Stable<br>
|
132 |
-
速い代わりに品質が低下する可能性があります。
|
133 |
</p>
|
134 |
<p>
|
135 |
サンプル: そのままGenerateボタンを押してください。<br>
|
|
|
7 |
from huggingface_hub import hf_hub_download
|
8 |
import torch
|
9 |
from torch import autocast
|
10 |
+
from diffusers import StableDiffusionXLPipeline, DPMSolverMultistepScheduler
|
11 |
from safetensors import safe_open
|
12 |
from compel import Compel, ReturnedEmbeddingsType
|
13 |
from safetensors.torch import load_file
|
|
|
15 |
model_id = 'aipicasso/emi-stable'
|
16 |
auth_token=os.environ["ACCESS_TOKEN"]
|
17 |
|
18 |
+
scheduler=DPMSolverMultistepScheduler(algorithm_type="sde-dpmsolver++",use_karras_sigmas=True)
|
19 |
+
|
20 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
21 |
model_id,
|
22 |
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
23 |
+
scheduler=scheduler,
|
24 |
use_auth_token=auth_token)
|
25 |
|
26 |
|
|
|
119 |
f"""
|
120 |
<div class="main-div">
|
121 |
<div>
|
122 |
+
<h1>Emi Stable Demo</h1>
|
123 |
<!--
|
124 |
<h2>
|
125 |
Other Demos:
|
|
|
132 |
</div>
|
133 |
<p>
|
134 |
Demo for Emi Stable<br>
|
|
|
135 |
</p>
|
136 |
<p>
|
137 |
サンプル: そのままGenerateボタンを押してください。<br>
|