Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1626,7 +1626,7 @@ if __name__ == "__main__":
|
|
1626 |
# GRADIO MODE
|
1627 |
|
1628 |
@spaces.GPU()
|
1629 |
-
def infer(prompt, resolution, num_inference_steps, guidance_scale, seed, progress=gr.Progress(track_tqdm=True)):
|
1630 |
set_seed(seed)
|
1631 |
width,height = list(map(int, resolution.split(',')))
|
1632 |
cross_attention_kwargs = {"edit_type": "visualize",
|
@@ -1660,7 +1660,7 @@ if __name__ == "__main__":
|
|
1660 |
upscale_mode=args.upscale_mode,
|
1661 |
use_multidiffusion=args.use_multidiffusion,
|
1662 |
use_skip_residual=args.use_skip_residual,
|
1663 |
-
use_progressive_upscaling=
|
1664 |
use_dilated_sampling=args.use_dilated_sampling,
|
1665 |
shuffle=args.shuffle,
|
1666 |
result_path=result_path,
|
@@ -1725,6 +1725,7 @@ if __name__ == "__main__":
|
|
1725 |
num_inference_steps = gr.Slider(label="Inference Steps", minimum=2, maximum=50, step=1, value=50)
|
1726 |
guidance_scale = gr.Slider(label="Guidance Scale", minimum=1, maximum=510, step=0.1, value=7.5)
|
1727 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=42)
|
|
|
1728 |
|
1729 |
output_images = gr.Image(label="Output Image", format="png")
|
1730 |
gr.Examples(
|
@@ -1737,7 +1738,7 @@ if __name__ == "__main__":
|
|
1737 |
)
|
1738 |
submit_btn.click(
|
1739 |
fn = infer,
|
1740 |
-
inputs = [prompt, resolution, num_inference_steps, guidance_scale, seed],
|
1741 |
outputs = [output_images],
|
1742 |
show_api=False
|
1743 |
)
|
|
|
1626 |
# GRADIO MODE
|
1627 |
|
1628 |
@spaces.GPU()
|
1629 |
+
def infer(prompt, resolution, num_inference_steps, guidance_scale, seed, use_progressive_upscaling, progress=gr.Progress(track_tqdm=True)):
|
1630 |
set_seed(seed)
|
1631 |
width,height = list(map(int, resolution.split(',')))
|
1632 |
cross_attention_kwargs = {"edit_type": "visualize",
|
|
|
1660 |
upscale_mode=args.upscale_mode,
|
1661 |
use_multidiffusion=args.use_multidiffusion,
|
1662 |
use_skip_residual=args.use_skip_residual,
|
1663 |
+
use_progressive_upscaling=use_progressive_upscaling,
|
1664 |
use_dilated_sampling=args.use_dilated_sampling,
|
1665 |
shuffle=args.shuffle,
|
1666 |
result_path=result_path,
|
|
|
1725 |
num_inference_steps = gr.Slider(label="Inference Steps", minimum=2, maximum=50, step=1, value=50)
|
1726 |
guidance_scale = gr.Slider(label="Guidance Scale", minimum=1, maximum=510, step=0.1, value=7.5)
|
1727 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=42)
|
1728 |
+
use_progressive_upscaling = gr.Checkbox(label="use_progressive_upscaling", value=False)
|
1729 |
|
1730 |
output_images = gr.Image(label="Output Image", format="png")
|
1731 |
gr.Examples(
|
|
|
1738 |
)
|
1739 |
submit_btn.click(
|
1740 |
fn = infer,
|
1741 |
+
inputs = [prompt, resolution, num_inference_steps, guidance_scale, seed, use_progressive_upscaling],
|
1742 |
outputs = [output_images],
|
1743 |
show_api=False
|
1744 |
)
|