Update pipeline.py
Browse files- pipeline.py +1 -1
pipeline.py
CHANGED
@@ -44,7 +44,7 @@ class PreTrainedPipeline():
|
|
44 |
"""
|
45 |
parameters = {"mode": "image"}
|
46 |
# decode base64 image to PIL
|
47 |
-
image = Image.open(BytesIO(base64.b64decode(inputs)))
|
48 |
image = self.transform(image).unsqueeze(0).to(device)
|
49 |
text=""
|
50 |
with torch.no_grad():
|
|
|
44 |
"""
|
45 |
parameters = {"mode": "image"}
|
46 |
# decode base64 image to PIL
|
47 |
+
image = Image.open(BytesIO(base64.b64decode(inputs))).convert("RGB")
|
48 |
image = self.transform(image).unsqueeze(0).to(device)
|
49 |
text=""
|
50 |
with torch.no_grad():
|