Deadmon commited on
Commit
1085139
·
verified ·
1 Parent(s): c1ee8d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import torch
2
  from diffusers.utils import load_image
3
  from diffusers import FluxControlNetPipeline, FluxControlNetModel, FluxMultiControlNetModel
@@ -24,18 +25,18 @@ control_modes = [
24
  ]
25
 
26
  @spaces.GPU
27
- def generate_image(prompt, control_image_depth, control_mode_depth_index, use_depth, control_image_canny, control_mode_canny_index):
28
  control_images = []
29
  control_modes = []
30
  conditioning_scales = []
31
 
32
  if use_depth:
33
  control_images.append(control_image_depth)
34
- control_modes.append(control_mode_depth_index)
35
  conditioning_scales.append(0.2)
36
 
37
  control_images.append(control_image_canny)
38
- control_modes.append(control_mode_canny_index)
39
  conditioning_scales.append(0.4)
40
 
41
  width, height = control_image_canny.size
 
1
+
2
  import torch
3
  from diffusers.utils import load_image
4
  from diffusers import FluxControlNetPipeline, FluxControlNetModel, FluxMultiControlNetModel
 
25
  ]
26
 
27
  @spaces.GPU
28
+ def generate_image(prompt, control_image_depth, control_mode_depth, use_depth, control_image_canny, control_mode_canny):
29
  control_images = []
30
  control_modes = []
31
  conditioning_scales = []
32
 
33
  if use_depth:
34
  control_images.append(control_image_depth)
35
+ control_modes.append(control_modes.index(control_mode_depth))
36
  conditioning_scales.append(0.2)
37
 
38
  control_images.append(control_image_canny)
39
+ control_modes.append(control_modes.index(control_mode_canny))
40
  conditioning_scales.append(0.4)
41
 
42
  width, height = control_image_canny.size