Spaces:
Running
on
Zero
Running
on
Zero
Update inferencer.py
Browse files- inferencer.py +2 -0
inferencer.py
CHANGED
@@ -300,6 +300,8 @@ class UniPicV2Inferencer:
|
|
300 |
guidance_scale: float = 3.0,
|
301 |
seed: int = 42
|
302 |
) -> Image.Image:
|
|
|
|
|
303 |
if not self.pipeline:
|
304 |
self.pipeline = self._init_pipeline()
|
305 |
original_size = image.size
|
|
|
300 |
guidance_scale: float = 3.0,
|
301 |
seed: int = 42
|
302 |
) -> Image.Image:
|
303 |
+
if image.mode in ["RGBA", "LA"] or image.mode.startswith("A"):
|
304 |
+
image = image.convert("RGB")
|
305 |
if not self.pipeline:
|
306 |
self.pipeline = self._init_pipeline()
|
307 |
original_size = image.size
|