Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -13,15 +13,13 @@ for n in range(1, 10):
|
|
13 |
|
14 |
|
15 |
@spaces.GPU()
|
16 |
-
def infer(init_image, prompt, negative_prompt, seed,
|
17 |
return model(
|
18 |
init_image,
|
19 |
prompt=prompt,
|
20 |
negative_prompt=negative_prompt,
|
21 |
guidance_scale=guidance_scale,
|
22 |
num_inference_steps=num_inference_steps,
|
23 |
-
height=height,
|
24 |
-
width=width,
|
25 |
seed=seed
|
26 |
)
|
27 |
|
@@ -37,9 +35,6 @@ with gr.Blocks() as demo:
|
|
37 |
with gr.Accordion("Advanced Settings", open=False):
|
38 |
negative_prompt = gr.Text(label="Negative Prompt", max_lines=1, placeholder="Enter a negative prompt")
|
39 |
seed = gr.Slider(label="Seed", minimum=0, maximum=1_000_000, step=1, value=0)
|
40 |
-
with gr.Row():
|
41 |
-
width = gr.Slider(label="Width", minimum=256, maximum=1344, step=64, value=1024)
|
42 |
-
height = gr.Slider(label="Height", minimum=256, maximum=1344, step=64, value=1024)
|
43 |
with gr.Row():
|
44 |
guidance_scale = gr.Slider(label="Guidance scale", minimum=0.0, maximum=10.0, step=0.1, value=7.5)
|
45 |
num_inference_steps = gr.Slider(label="Inference steps", minimum=1, maximum=50, step=1, value=50)
|
@@ -47,7 +42,7 @@ with gr.Blocks() as demo:
|
|
47 |
gr.on(
|
48 |
triggers=[run_button.click, prompt.submit, negative_prompt.submit],
|
49 |
fn=infer,
|
50 |
-
inputs=[init_image, prompt, negative_prompt, seed,
|
51 |
outputs=[result]
|
52 |
)
|
53 |
demo.launch(server_name="0.0.0.0")
|
|
|
13 |
|
14 |
|
15 |
@spaces.GPU()
|
16 |
+
def infer(init_image, prompt, negative_prompt, seed, guidance_scale, num_inference_steps):
|
17 |
return model(
|
18 |
init_image,
|
19 |
prompt=prompt,
|
20 |
negative_prompt=negative_prompt,
|
21 |
guidance_scale=guidance_scale,
|
22 |
num_inference_steps=num_inference_steps,
|
|
|
|
|
23 |
seed=seed
|
24 |
)
|
25 |
|
|
|
35 |
with gr.Accordion("Advanced Settings", open=False):
|
36 |
negative_prompt = gr.Text(label="Negative Prompt", max_lines=1, placeholder="Enter a negative prompt")
|
37 |
seed = gr.Slider(label="Seed", minimum=0, maximum=1_000_000, step=1, value=0)
|
|
|
|
|
|
|
38 |
with gr.Row():
|
39 |
guidance_scale = gr.Slider(label="Guidance scale", minimum=0.0, maximum=10.0, step=0.1, value=7.5)
|
40 |
num_inference_steps = gr.Slider(label="Inference steps", minimum=1, maximum=50, step=1, value=50)
|
|
|
42 |
gr.on(
|
43 |
triggers=[run_button.click, prompt.submit, negative_prompt.submit],
|
44 |
fn=infer,
|
45 |
+
inputs=[init_image, prompt, negative_prompt, seed, guidance_scale, num_inference_steps],
|
46 |
outputs=[result]
|
47 |
)
|
48 |
demo.launch(server_name="0.0.0.0")
|