Commit
·
7120442
1
Parent(s):
5fef8b2
Update app.py
Browse files
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,
|
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:
|