multimodalart HF staff commited on
Commit
c590a10
1 Parent(s): 3f6a115

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ from region_control import MultiDiffusion, get_views, preprocess_mask
7
  from sketch_helper import get_high_freq_colors, color_quantization, create_binary_matrix
8
  MAX_COLORS = 12
9
 
10
- sd = MultiDiffusion("cuda", "2.1")
11
 
12
  def process_sketch(image, binary_matrixes):
13
  high_freq_colors = get_high_freq_colors(image)
@@ -21,7 +21,7 @@ def process_sketch(image, binary_matrixes):
21
  if any(c != 255 for c in (r, g, b)):
22
  binary_matrix = create_binary_matrix(im2arr, (r,g,b))
23
  binary_matrixes.append(binary_matrix)
24
- colors_fixed.append(gr.update(value=f'<div class="color-bg-item" style="background-color: rgb({r},{g},{b})"></div>'))
25
  visibilities = []
26
  colors = []
27
  for n in range(MAX_COLORS):
 
7
  from sketch_helper import get_high_freq_colors, color_quantization, create_binary_matrix
8
  MAX_COLORS = 12
9
 
10
+ sd = MultiDiffusion("cuda", "2.0")
11
 
12
  def process_sketch(image, binary_matrixes):
13
  high_freq_colors = get_high_freq_colors(image)
 
21
  if any(c != 255 for c in (r, g, b)):
22
  binary_matrix = create_binary_matrix(im2arr, (r,g,b))
23
  binary_matrixes.append(binary_matrix)
24
+ colors_fixed.append(gr.update(value=f'<div><img src="file/{binary_matrix}" /><div class="color-bg-item" style="background-color: rgb({r},{g},{b})"></div></div>'))
25
  visibilities = []
26
  colors = []
27
  for n in range(MAX_COLORS):