1lint commited on
Commit
3e2d60d
·
1 Parent(s): 0d0a1c2

small ui fix

Browse files
Files changed (2) hide show
  1. src/app.py +4 -4
  2. src/ui_functions.py +2 -2
src/app.py CHANGED
@@ -79,15 +79,15 @@ with gr.Blocks(theme=theme) as demo:
79
  with gr.Row():
80
  controlnet_cond_scale = gr.Slider(
81
  label="Controlnet Weight",
82
- value=0.5,
83
  minimum=0.0,
84
- maximum=1.0,
85
  step=0.1,
86
  )
87
 
88
  with gr.Row():
89
  batch_size = gr.Slider(
90
- label="Batch Size", value=1, minimum=1, maximum=8, step=1
91
  )
92
  seed = gr.Slider(-1, 2147483647, label="Seed", value=-1, step=1)
93
 
@@ -177,7 +177,7 @@ with gr.Blocks(theme=theme) as demo:
177
  )
178
 
179
  training_button = gr.Button(
180
- value="Train Style ControlNet", variant="primary"
181
  )
182
 
183
  training_status = gr.Text(label="Training Status")
 
79
  with gr.Row():
80
  controlnet_cond_scale = gr.Slider(
81
  label="Controlnet Weight",
82
+ value=1.0,
83
  minimum=0.0,
84
+ maximum=2.0,
85
  step=0.1,
86
  )
87
 
88
  with gr.Row():
89
  batch_size = gr.Slider(
90
+ label="Batch Size", value=1, minimum=1, maximum=4, step=1
91
  )
92
  seed = gr.Slider(-1, 2147483647, label="Seed", value=-1, step=1)
93
 
 
177
  )
178
 
179
  training_button = gr.Button(
180
+ value="Train Anime ControlNet", variant="primary"
181
  )
182
 
183
  training_status = gr.Text(label="Training Status")
src/ui_functions.py CHANGED
@@ -140,11 +140,11 @@ def generate(
140
 
141
  if seed == -1:
142
  seed = random.randint(0, 2147483647)
143
-
144
  if guidance_image:
145
  guidance_image = extract_canny(guidance_image)
146
  else:
147
- guidance_image = torch.zeros(n_images, 3, height, width)
148
 
149
  generator = torch.Generator(device).manual_seed(seed)
150
 
 
140
 
141
  if seed == -1:
142
  seed = random.randint(0, 2147483647)
143
+
144
  if guidance_image:
145
  guidance_image = extract_canny(guidance_image)
146
  else:
147
+ guidance_image = torch.zeros(1, 3, height, width)
148
 
149
  generator = torch.Generator(device).manual_seed(seed)
150