Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
20 |
MAX_IMAGE_SIZE = 1024
|
21 |
|
22 |
@spaces.GPU()
|
23 |
-
def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps, progress=gr.Progress(track_tqdm=True)):
|
24 |
|
25 |
if randomize_seed:
|
26 |
seed = random.randint(0, MAX_SEED)
|
@@ -131,7 +131,10 @@ with gr.Blocks(css=css) as demo:
|
|
131 |
|
132 |
gr.Examples(
|
133 |
examples=examples,
|
134 |
-
inputs=[prompt]
|
|
|
|
|
|
|
135 |
)
|
136 |
|
137 |
gr.on(
|
|
|
20 |
MAX_IMAGE_SIZE = 1024
|
21 |
|
22 |
@spaces.GPU()
|
23 |
+
def infer(prompt, negative_prompt="low quality, ugly, unfinished, out of focus, deformed, disfigure, blurry, smudged, restricted palette, flat colors", seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=3.0, num_inference_steps=40, progress=gr.Progress(track_tqdm=True)):
|
24 |
|
25 |
if randomize_seed:
|
26 |
seed = random.randint(0, MAX_SEED)
|
|
|
131 |
|
132 |
gr.Examples(
|
133 |
examples=examples,
|
134 |
+
inputs=[prompt],
|
135 |
+
outputs=[result, seed],
|
136 |
+
fn=infer,
|
137 |
+
cache_examples="lazy"
|
138 |
)
|
139 |
|
140 |
gr.on(
|