smthem commited on
Commit
69a3601
1 Parent(s): 1fffeef

Update pipeline.py

Browse files

When use example like "prompt =Image.open.(path/to/*.png)", the type is class( Image.Image), check_inputs will raise ValueError...

Files changed (1) hide show
  1. pipeline.py +1 -1
pipeline.py CHANGED
@@ -414,7 +414,7 @@ class MatForgerPipeline(DiffusionPipeline, FromSingleFileMixin):
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)
418
  ):
419
  raise ValueError(
420
  f"`prompt` has to be of type `str` or `list` but is {type(prompt)}"
 
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)}"