asahi417 commited on
Commit
9c0c009
1 Parent(s): 414ba11

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,12 +1,11 @@
1
  import gradio as gr
2
- import torch
3
  from diffusers.utils import load_image
4
  import spaces
5
  from panna import ControlNetSD3
6
 
7
  model = ControlNetSD3(condition_type="canny")
8
  title = ("# [ControlNet SD3](https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_sd3) (Canny Edge Conditioning)\n"
9
- "The demo is part of [panna](https://github.com/abacws-abacus/panna) project.")
10
  example_files = []
11
  for n in range(1, 10):
12
  load_image(f"https://huggingface.co/spaces/depth-anything/Depth-Anything-V2/resolve/main/assets/examples/demo{n:0>2}.jpg").save(f"demo{n:0>2}.jpg")
@@ -38,9 +37,9 @@ with gr.Blocks() as demo:
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
- guidance_scale = gr.Slider(label="Guidance scale", minimum=0.0, maximum=10.0, step=0.1, value=7.5)
42
  controlnet_conditioning_scale = gr.Slider(label="Controlnet conditioning scale", minimum=0.0, maximum=1.0, step=0.05, value=0.5)
43
- num_inference_steps = gr.Slider(label="Inference steps", minimum=1, maximum=50, step=1, value=50)
44
  examples = gr.Examples(examples=example_files, inputs=[init_image])
45
  gr.on(
46
  triggers=[run_button.click, prompt.submit, negative_prompt.submit],
 
1
  import gradio as gr
 
2
  from diffusers.utils import load_image
3
  import spaces
4
  from panna import ControlNetSD3
5
 
6
  model = ControlNetSD3(condition_type="canny")
7
  title = ("# [ControlNet SD3](https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_sd3) (Canny Edge Conditioning)\n"
8
+ "The demo is part of [panna](https://github.com/asahi417/panna) project.")
9
  example_files = []
10
  for n in range(1, 10):
11
  load_image(f"https://huggingface.co/spaces/depth-anything/Depth-Anything-V2/resolve/main/assets/examples/demo{n:0>2}.jpg").save(f"demo{n:0>2}.jpg")
 
37
  negative_prompt = gr.Text(label="Negative Prompt", max_lines=1, placeholder="Enter a negative prompt")
38
  seed = gr.Slider(label="Seed", minimum=0, maximum=1_000_000, step=1, value=0)
39
  with gr.Row():
40
+ guidance_scale = gr.Slider(label="Guidance scale", minimum=0.0, maximum=10.0, step=0.1, value=7)
41
  controlnet_conditioning_scale = gr.Slider(label="Controlnet conditioning scale", minimum=0.0, maximum=1.0, step=0.05, value=0.5)
42
+ num_inference_steps = gr.Slider(label="Inference steps", minimum=1, maximum=50, step=1, value=28)
43
  examples = gr.Examples(examples=example_files, inputs=[init_image])
44
  gr.on(
45
  triggers=[run_button.click, prompt.submit, negative_prompt.submit],