Baptlem commited on
Commit
3f2581f
1 Parent(s): 628e6c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -2,7 +2,6 @@
2
  # The original license file is LICENSE.ControlNet in this repo.
3
  import gradio as gr
4
 
5
- """
6
  def create_demo(process, max_images=12, default_num_images=3):
7
  with gr.Blocks() as demo:
8
  with gr.Row():
@@ -13,16 +12,13 @@ def create_demo(process, max_images=12, default_num_images=3):
13
  prompt = gr.Textbox(label='Prompt')
14
  run_button = gr.Button(label='Run')
15
  with gr.Accordion('Advanced options', open=False):
 
 
16
  num_samples = gr.Slider(label='Images',
17
  minimum=1,
18
  maximum=max_images,
19
  value=default_num_images,
20
  step=1)
21
- image_resolution = gr.Slider(label='Image Resolution',
22
- minimum=256,
23
- maximum=512,
24
- value=512,
25
- step=256)
26
  canny_low_threshold = gr.Slider(
27
  label='Canny low threshold',
28
  minimum=1,
@@ -43,7 +39,7 @@ def create_demo(process, max_images=12, default_num_images=3):
43
  guidance_scale = gr.Slider(label='Guidance Scale',
44
  minimum=0.1,
45
  maximum=30.0,
46
- value=9.0,
47
  step=0.1)
48
  seed = gr.Slider(label='Seed',
49
  minimum=-1,
@@ -69,7 +65,6 @@ def create_demo(process, max_images=12, default_num_images=3):
69
  a_prompt,
70
  n_prompt,
71
  num_samples,
72
- image_resolution,
73
  num_steps,
74
  guidance_scale,
75
  seed,
@@ -85,8 +80,10 @@ def create_demo(process, max_images=12, default_num_images=3):
85
 
86
 
87
  if __name__ == '__main__':
 
88
  from model import Model
89
  model = Model()
90
  demo = create_demo(model.process_canny)
91
  demo.queue().launch()
92
- """
 
 
2
  # The original license file is LICENSE.ControlNet in this repo.
3
  import gradio as gr
4
 
 
5
  def create_demo(process, max_images=12, default_num_images=3):
6
  with gr.Blocks() as demo:
7
  with gr.Row():
 
12
  prompt = gr.Textbox(label='Prompt')
13
  run_button = gr.Button(label='Run')
14
  with gr.Accordion('Advanced options', open=False):
15
+ is_segmentation_map = gr.Checkbox(
16
+ label='Is segmentation map', value=False)
17
  num_samples = gr.Slider(label='Images',
18
  minimum=1,
19
  maximum=max_images,
20
  value=default_num_images,
21
  step=1)
 
 
 
 
 
22
  canny_low_threshold = gr.Slider(
23
  label='Canny low threshold',
24
  minimum=1,
 
39
  guidance_scale = gr.Slider(label='Guidance Scale',
40
  minimum=0.1,
41
  maximum=30.0,
42
+ value=7.5,
43
  step=0.1)
44
  seed = gr.Slider(label='Seed',
45
  minimum=-1,
 
65
  a_prompt,
66
  n_prompt,
67
  num_samples,
 
68
  num_steps,
69
  guidance_scale,
70
  seed,
 
80
 
81
 
82
  if __name__ == '__main__':
83
+ """
84
  from model import Model
85
  model = Model()
86
  demo = create_demo(model.process_canny)
87
  demo.queue().launch()
88
+ """
89
+ pass