Update worker_runpod.py
Browse files- worker_runpod.py +1 -1
worker_runpod.py
CHANGED
@@ -33,7 +33,7 @@ def generate(input):
|
|
33 |
input_image_url = values['input_image_check']
|
34 |
input_image = download_file(input_image_url)
|
35 |
|
36 |
-
input_image = Image.open(input_image)
|
37 |
image_size = input_image.size
|
38 |
input_images = transform_image(input_image).unsqueeze(0).to("cuda")
|
39 |
preds = birefnet(input_images)[-1].sigmoid().cpu()
|
|
|
33 |
input_image_url = values['input_image_check']
|
34 |
input_image = download_file(input_image_url)
|
35 |
|
36 |
+
input_image = Image.open(input_image).convert("RGB")
|
37 |
image_size = input_image.size
|
38 |
input_images = transform_image(input_image).unsqueeze(0).to("cuda")
|
39 |
preds = birefnet(input_images)[-1].sigmoid().cpu()
|