mirror of
https://github.com/THUDM/CogVideo.git
synced 2025-12-02 10:32:09 +08:00
Update predict.py
This commit is contained in:
parent
7e5cd59fd0
commit
e0067c5132
@ -497,7 +497,8 @@ class Predictor(BasePredictor):
|
||||
self.args.seed = seed
|
||||
self.args.use_guidance_stage1 = use_guidance
|
||||
self.prompt = prompt
|
||||
if os.path.exists(image_prompt):
|
||||
self.image_prompt = None
|
||||
if os.path.exists(str(image_prompt)):
|
||||
try:
|
||||
Image.open(str(image_prompt))
|
||||
except (FileNotFoundError, UnidentifiedImageError):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user