Spaces:
Runtime error
Runtime error
update app
Browse files
app.py
CHANGED
@@ -8,11 +8,14 @@ import subprocess
|
|
8 |
from diffusers import StableDiffusionPipeline
|
9 |
import time
|
10 |
|
|
|
|
|
|
|
11 |
model_id = "dicoo_model"
|
12 |
|
13 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float)
|
14 |
|
15 |
-
def predict(prompt, steps=
|
16 |
# cpu info
|
17 |
# print(subprocess.check_output(["cat /proc/cpuinfo | grep 'model name' |uniq"], stderr=subprocess.STDOUT).decode("utf8"))
|
18 |
print("prompt: ", prompt)
|
@@ -36,7 +39,7 @@ gr.Interface(
|
|
36 |
predict,
|
37 |
inputs=[
|
38 |
gr.inputs.Textbox(label='Prompt', default='a lovely <dicoo> in red dress and hat, in the snowy and brightly night, with many brightly buildings'),
|
39 |
-
gr.inputs.Slider(1, 100, label='Inference Steps', default=
|
40 |
gr.inputs.Slider(0, 2147483647, label='Seed', default=random_seed, step=1),
|
41 |
gr.inputs.Slider(1.0, 20.0, label='Guidance Scale - how much the prompt will influence the results', default=6.0, step=0.1),
|
42 |
],
|
|
|
8 |
from diffusers import StableDiffusionPipeline
|
9 |
import time
|
10 |
|
11 |
+
repo_id = "runwayml/stable-diffusion-v1-5"
|
12 |
+
dpm = DPMSolverMultistepScheduler.from_pretrained(repo_id, subfolder="scheduler")
|
13 |
+
|
14 |
model_id = "dicoo_model"
|
15 |
|
16 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=dpm, torch_dtype=torch.float)
|
17 |
|
18 |
+
def predict(prompt, steps=25, seed=42, guidance_scale=7.5):
|
19 |
# cpu info
|
20 |
# print(subprocess.check_output(["cat /proc/cpuinfo | grep 'model name' |uniq"], stderr=subprocess.STDOUT).decode("utf8"))
|
21 |
print("prompt: ", prompt)
|
|
|
39 |
predict,
|
40 |
inputs=[
|
41 |
gr.inputs.Textbox(label='Prompt', default='a lovely <dicoo> in red dress and hat, in the snowy and brightly night, with many brightly buildings'),
|
42 |
+
gr.inputs.Slider(1, 100, label='Inference Steps', default=25, step=1),
|
43 |
gr.inputs.Slider(0, 2147483647, label='Seed', default=random_seed, step=1),
|
44 |
gr.inputs.Slider(1.0, 20.0, label='Guidance Scale - how much the prompt will influence the results', default=6.0, step=0.1),
|
45 |
],
|