radames commited on
Commit
c6d9ca2
1 Parent(s): fb6b5c1

Update pipeline.py

Browse files
Files changed (1) hide show
  1. 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():