Spaces:
Running
on
L40S
Running
on
L40S
update
Browse files- infer_api.py +4 -0
infer_api.py
CHANGED
@@ -199,11 +199,15 @@ def inference(validation_pipeline, bkg_remover, input_image, vae, feature_extrac
|
|
199 |
use_noise=use_noise, **validation,)
|
200 |
out = rearrange(out, "B C f H W -> (B f) C H W", f=1)
|
201 |
|
|
|
|
|
202 |
img_buf = io.BytesIO()
|
203 |
save_image(out[0], img_buf, format='PNG')
|
204 |
img_buf.seek(0)
|
205 |
img = Image.open(img_buf)
|
206 |
|
|
|
|
|
207 |
torch.cuda.empty_cache()
|
208 |
return img
|
209 |
|
|
|
199 |
use_noise=use_noise, **validation,)
|
200 |
out = rearrange(out, "B C f H W -> (B f) C H W", f=1)
|
201 |
|
202 |
+
print("OUT!!!!!!")
|
203 |
+
|
204 |
img_buf = io.BytesIO()
|
205 |
save_image(out[0], img_buf, format='PNG')
|
206 |
img_buf.seek(0)
|
207 |
img = Image.open(img_buf)
|
208 |
|
209 |
+
print("OUT2!!!!!!")
|
210 |
+
|
211 |
torch.cuda.empty_cache()
|
212 |
return img
|
213 |
|