Update pipeline.py
Browse filesWhen use example like "prompt =Image.open.(path/to/*.png)", the type is class( Image.Image), check_inputs will raise ValueError...
- 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)}"
|