multimodalart HF staff commited on
Commit
7120442
1 Parent(s): 5fef8b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,10 +10,10 @@ MAX_COLORS = 12
10
  sd = MultiDiffusion("cuda", "2.0")
11
 
12
  def process_sketch(image, binary_matrixes):
13
- high_freq_colors = get_high_freq_colors(image)
14
  how_many_colors = len(high_freq_colors)
15
  im2arr = np.array(image) # im2arr.shape: height x width x channel
16
- im2arr = color_quantization(im2arr, n_colors=how_many_colors)
17
 
18
  colors_fixed = []
19
  for color in high_freq_colors:
 
10
  sd = MultiDiffusion("cuda", "2.0")
11
 
12
  def process_sketch(image, binary_matrixes):
13
+ high_freq_colors, image = get_high_freq_colors(image)
14
  how_many_colors = len(high_freq_colors)
15
  im2arr = np.array(image) # im2arr.shape: height x width x channel
16
+ im2arr = color_quantization(im2arr, high_freq_colors)
17
 
18
  colors_fixed = []
19
  for color in high_freq_colors: