Spaces:
Running
on
Zero
Running
on
Zero
alfredplpl
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import spaces
|
|
7 |
|
8 |
device = "cuda"
|
9 |
|
10 |
-
pipe = DiffusionPipeline.from_pretrained("aipicasso/emi-2")
|
11 |
pipe = pipe.to(device)
|
12 |
|
13 |
|
@@ -34,7 +34,7 @@ def infer(seed, randomize_seed, width, height, guidance_scale, num_inference_ste
|
|
34 |
generator = generator
|
35 |
).images[0]
|
36 |
|
37 |
-
return image
|
38 |
|
39 |
css="""
|
40 |
#col-container {
|
@@ -101,13 +101,13 @@ with gr.Blocks(css=css) as demo:
|
|
101 |
minimum=1,
|
102 |
maximum=30,
|
103 |
step=1,
|
104 |
-
value=
|
105 |
)
|
106 |
|
107 |
run_button.click(
|
108 |
fn = infer,
|
109 |
inputs = [seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
110 |
-
outputs = [result]
|
111 |
)
|
112 |
|
113 |
demo.queue().launch()
|
|
|
7 |
|
8 |
device = "cuda"
|
9 |
|
10 |
+
pipe = DiffusionPipeline.from_pretrained("aipicasso/emi-2",torch_dtype=torch.bfloat16)
|
11 |
pipe = pipe.to(device)
|
12 |
|
13 |
|
|
|
34 |
generator = generator
|
35 |
).images[0]
|
36 |
|
37 |
+
return image, prompt
|
38 |
|
39 |
css="""
|
40 |
#col-container {
|
|
|
101 |
minimum=1,
|
102 |
maximum=30,
|
103 |
step=1,
|
104 |
+
value=20,
|
105 |
)
|
106 |
|
107 |
run_button.click(
|
108 |
fn = infer,
|
109 |
inputs = [seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
110 |
+
outputs = [result,"textbox"]
|
111 |
)
|
112 |
|
113 |
demo.queue().launch()
|