Force RGB for img2img

This commit is contained in:
Kyle Schouviller 2022-10-26 12:09:38 -07:00
parent bd8bb8c80b
commit d05373d35a

View File

@ -29,7 +29,7 @@ class Img2Img(Generator):
) )
if isinstance(init_image, PIL.Image.Image): if isinstance(init_image, PIL.Image.Image):
init_image = self._image_to_tensor(init_image) init_image = self._image_to_tensor(init_image.convert('RGB'))
scope = choose_autocast(self.precision) scope = choose_autocast(self.precision)
with scope(self.model.device.type): with scope(self.model.device.type):