Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -101,16 +101,18 @@ def run_dif_color(out_prompt,im_path,model_drop,tint,im_height,im_width):
|
|
101 |
#model=gr.load(f'models/{model[int(model_drop)]}')
|
102 |
model=loaded_model[int(model_drop)]
|
103 |
out_img=model(out_prompt+p_seed)
|
104 |
-
print(out_img)
|
105 |
|
106 |
raw=Image.open(out_img)
|
107 |
raw=raw.convert('RGB')
|
108 |
|
109 |
colorize = RGBTransform().mix_with(color,factor=float(tint)).applied_to(raw)
|
110 |
print (colorize)
|
111 |
-
|
112 |
#out_box.append(f'tmp-{uid}.png')
|
113 |
-
out_box.append(
|
|
|
|
|
114 |
if out_box:
|
115 |
if len(out_box)>1:
|
116 |
im_roll = get_concat_v_cut(f'{out_box[0]}',f'{out_box[1]}')
|
|
|
101 |
#model=gr.load(f'models/{model[int(model_drop)]}')
|
102 |
model=loaded_model[int(model_drop)]
|
103 |
out_img=model(out_prompt+p_seed)
|
104 |
+
#print(out_img)
|
105 |
|
106 |
raw=Image.open(out_img)
|
107 |
raw=raw.convert('RGB')
|
108 |
|
109 |
colorize = RGBTransform().mix_with(color,factor=float(tint)).applied_to(raw)
|
110 |
print (colorize)
|
111 |
+
colorize.save(f'tmp-{uid}.png')
|
112 |
#out_box.append(f'tmp-{uid}.png')
|
113 |
+
out_box.append(f'tmp-{uid}.png')
|
114 |
+
|
115 |
+
print(f'out_box:: {out_box}')
|
116 |
if out_box:
|
117 |
if len(out_box)>1:
|
118 |
im_roll = get_concat_v_cut(f'{out_box[0]}',f'{out_box[1]}')
|