Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -228,7 +228,7 @@ with gr.Blocks(css=css) as demo:
|
|
228 |
image_url.submit(fn=image2image, inputs=[uploaded_image, image_url, gr.State(False)], outputs=additional_image_output)
|
229 |
|
230 |
@spaces.GPU
|
231 |
-
def infer2(prompt, seed=42,
|
232 |
if randomize_seed:
|
233 |
seed = random.randint(0, MAX_SEED)
|
234 |
generator = torch.Generator(device=device).manual_seed(seed)
|
@@ -248,7 +248,7 @@ with gr.Blocks(css=css) as demo:
|
|
248 |
gr.on(
|
249 |
triggers=[run2_button.click, prompt2.submit],
|
250 |
fn=infer2,
|
251 |
-
inputs=[prompt2,
|
252 |
outputs[final_image_output, seed2]
|
253 |
)
|
254 |
|
|
|
228 |
image_url.submit(fn=image2image, inputs=[uploaded_image, image_url, gr.State(False)], outputs=additional_image_output)
|
229 |
|
230 |
@spaces.GPU
|
231 |
+
def infer2(prompt, image, seed=42, randomize_seed=False, width=1024, height=1024, strength=.5, guidance_scale=5.0, num_inference_steps=28, progress=gr.Progress(track_tqdm=True)):
|
232 |
if randomize_seed:
|
233 |
seed = random.randint(0, MAX_SEED)
|
234 |
generator = torch.Generator(device=device).manual_seed(seed)
|
|
|
248 |
gr.on(
|
249 |
triggers=[run2_button.click, prompt2.submit],
|
250 |
fn=infer2,
|
251 |
+
inputs=[prompt2, additional_image_output, seed2, randomize_seed2, width2, height2, guidance_scale2, num_inference_steps2],
|
252 |
outputs[final_image_output, seed2]
|
253 |
)
|
254 |
|