Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
5072f90
1
Parent(s):
3d9b0ab
Update app.py
Browse files
app.py
CHANGED
@@ -26,12 +26,14 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
|
|
26 |
image = pipe(
|
27 |
prompt = prompt,
|
28 |
negative_prompt = negative_prompt,
|
|
|
|
|
29 |
guidance_scale = guidance_scale,
|
30 |
num_inference_steps = num_inference_steps,
|
31 |
generator = generator
|
32 |
).images[0]
|
33 |
|
34 |
-
return image
|
35 |
|
36 |
examples = [
|
37 |
"Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
|
@@ -138,7 +140,7 @@ with gr.Blocks(css=css) as demo:
|
|
138 |
triggers=[run_button.click, prompt.submit, negative_prompt.submit],
|
139 |
fn = infer,
|
140 |
inputs = [prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
141 |
-
outputs = [result]
|
142 |
)
|
143 |
|
144 |
demo.queue().launch()
|
|
|
26 |
image = pipe(
|
27 |
prompt = prompt,
|
28 |
negative_prompt = negative_prompt,
|
29 |
+
width=width,
|
30 |
+
height=height,
|
31 |
guidance_scale = guidance_scale,
|
32 |
num_inference_steps = num_inference_steps,
|
33 |
generator = generator
|
34 |
).images[0]
|
35 |
|
36 |
+
return image, seed
|
37 |
|
38 |
examples = [
|
39 |
"Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
|
|
|
140 |
triggers=[run_button.click, prompt.submit, negative_prompt.submit],
|
141 |
fn = infer,
|
142 |
inputs = [prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
143 |
+
outputs = [result, seed]
|
144 |
)
|
145 |
|
146 |
demo.queue().launch()
|