Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Upload app.py
Browse files
app.py
CHANGED
@@ -10,9 +10,9 @@ import re
|
|
10 |
model_id = "CompVis/stable-diffusion-v1-4"
|
11 |
device = "cuda"
|
12 |
|
13 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=
|
14 |
pipe = pipe.to(device)
|
15 |
-
word_list_dataset = load_dataset("stabilityai/word-list", data_files="list.txt", use_auth_token=
|
16 |
word_list = word_list_dataset["train"]['text']
|
17 |
|
18 |
def infer(prompt, samples, steps, scale, seed):
|
@@ -257,7 +257,7 @@ with block:
|
|
257 |
|
258 |
with gr.Row(elem_id="advanced-options"):
|
259 |
samples = gr.Slider(label="Images", minimum=1, maximum=4, value=4, step=1)
|
260 |
-
steps = gr.Slider(label="Steps", minimum=1, maximum=
|
261 |
scale = gr.Slider(
|
262 |
label="Guidance Scale", minimum=0, maximum=50, value=7.5, step=0.1
|
263 |
)
|
|
|
10 |
model_id = "CompVis/stable-diffusion-v1-4"
|
11 |
device = "cuda"
|
12 |
|
13 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=False, revision="fp16", torch_dtype=torch.float16)
|
14 |
pipe = pipe.to(device)
|
15 |
+
word_list_dataset = load_dataset("stabilityai/word-list", data_files="list.txt", use_auth_token=False)
|
16 |
word_list = word_list_dataset["train"]['text']
|
17 |
|
18 |
def infer(prompt, samples, steps, scale, seed):
|
|
|
257 |
|
258 |
with gr.Row(elem_id="advanced-options"):
|
259 |
samples = gr.Slider(label="Images", minimum=1, maximum=4, value=4, step=1)
|
260 |
+
steps = gr.Slider(label="Steps", minimum=1, maximum=150, value=45, step=1)
|
261 |
scale = gr.Slider(
|
262 |
label="Guidance Scale", minimum=0, maximum=50, value=7.5, step=0.1
|
263 |
)
|