Eugeoter commited on
Commit
5c1b749
·
1 Parent(s): 986882a
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -12,6 +12,9 @@ UNET_FILENAME = "ControlAny-SDXL/anime_canny/unet.safetensors"
12
  CONTROLNET_FILENAME = "ControlAny-SDXL/anime_canny/controlnet.safetensors"
13
  CACHE_DIR = None
14
 
 
 
 
15
 
16
  def ui():
17
  device = "cuda" if torch.cuda.is_available() else "cpu"
@@ -59,8 +62,8 @@ def ui():
59
  """)
60
  with gr.Row():
61
  with gr.Column(scale=9):
62
- prompt = gr.Textbox(lines=3, placeholder='prompt', container=False)
63
- negative_prompt = gr.Textbox(lines=3, placeholder='negative prompt', container=False)
64
  with gr.Column(scale=1):
65
  generate_button = gr.Button("Generate", variant='primary', min_width=96)
66
  with gr.Row():
@@ -84,10 +87,10 @@ def ui():
84
  allow_custom_value=False,
85
  filterable=True,
86
  )
87
- num_inference_steps = gr.Slider(minimum=1, maximum=100, step=1, value=20, label='Steps')
88
  with gr.Row():
89
  cfg_scale = gr.Slider(minimum=1, maximum=30, step=1, value=7.5, label='CFG Scale')
90
- controlnet_scale = gr.Slider(minimum=0, maximum=1, step=0.01, value=0.5, label='ControlNet Scale')
91
  with gr.Row():
92
  seed = gr.Number(label='Seed', step=1, precision=0, value=-1)
93
  with gr.Row():
 
12
  CONTROLNET_FILENAME = "ControlAny-SDXL/anime_canny/controlnet.safetensors"
13
  CACHE_DIR = None
14
 
15
+ DEFAULT_PROMPT = ""
16
+ DEFAULT_NEGATIVE_PROMPT = "worst quality, abstract, clumsy pose, deformed hand, dynamic malformation, fused fingers, extra digits, fewer digits, fewer fingers, extra fingers, extra arm, missing arm, extra leg, missing leg, signature, artist name, multi views, disfigured, ugly"
17
+
18
 
19
  def ui():
20
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
62
  """)
63
  with gr.Row():
64
  with gr.Column(scale=9):
65
+ prompt = gr.Textbox(value=DEFAULT_PROMPT, lines=3, placeholder='prompt', container=False)
66
+ negative_prompt = gr.Textbox(value=DEFAULT_NEGATIVE_PROMPT, lines=3, placeholder='negative prompt', container=False)
67
  with gr.Column(scale=1):
68
  generate_button = gr.Button("Generate", variant='primary', min_width=96)
69
  with gr.Row():
 
87
  allow_custom_value=False,
88
  filterable=True,
89
  )
90
+ num_inference_steps = gr.Slider(minimum=1, maximum=100, step=1, value=28, label='Steps')
91
  with gr.Row():
92
  cfg_scale = gr.Slider(minimum=1, maximum=30, step=1, value=7.5, label='CFG Scale')
93
+ controlnet_scale = gr.Slider(minimum=0, maximum=1, step=0.01, value=0.35, label='ControlNet Scale')
94
  with gr.Row():
95
  seed = gr.Number(label='Seed', step=1, precision=0, value=-1)
96
  with gr.Row():