mirror of
https://github.com/THUDM/CogVideo.git
synced 2025-12-03 11:12:09 +08:00
Update predict.py
This commit is contained in:
parent
c52d82f6b0
commit
7e5cd59fd0
@ -499,7 +499,7 @@ class Predictor(BasePredictor):
|
|||||||
self.prompt = prompt
|
self.prompt = prompt
|
||||||
if os.path.exists(image_prompt):
|
if os.path.exists(image_prompt):
|
||||||
try:
|
try:
|
||||||
Image.open(image_prompt)
|
Image.open(str(image_prompt))
|
||||||
except (FileNotFoundError, UnidentifiedImageError):
|
except (FileNotFoundError, UnidentifiedImageError):
|
||||||
logging.debug("Bad image prompt; ignoring") # Is there a better way to input images?
|
logging.debug("Bad image prompt; ignoring") # Is there a better way to input images?
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user