Files changed (1) hide show
  1. pipeline.py +3 -2
pipeline.py CHANGED
@@ -62,7 +62,8 @@ def postprocess(
62
  output_type = "np"
63
 
64
  image = image.detach().cpu()
65
-
 
66
  if output_type == "latent":
67
  return image
68
 
@@ -413,7 +414,7 @@ class MatForgerPipeline(DiffusionPipeline, FromSingleFileMixin):
413
  "Provide either `prompt` or `prompt_embeds`. Cannot leave both `prompt` and `prompt_embeds` undefined."
414
  )
415
  elif prompt is not None and (
416
- not isinstance(prompt, str) and not isinstance(prompt, list)
417
  ):
418
  raise ValueError(
419
  f"`prompt` has to be of type `str` or `list` but is {type(prompt)}"
 
62
  output_type = "np"
63
 
64
  image = image.detach().cpu()
65
+ image = image.to(torch.float32)
66
+
67
  if output_type == "latent":
68
  return image
69
 
 
414
  "Provide either `prompt` or `prompt_embeds`. Cannot leave both `prompt` and `prompt_embeds` undefined."
415
  )
416
  elif prompt is not None and (
417
+ not isinstance(prompt, str) and not isinstance(prompt, list) or not isinstance(prompt, Image.Image)
418
  ):
419
  raise ValueError(
420
  f"`prompt` has to be of type `str` or `list` but is {type(prompt)}"