This repository was archived by the owner on Sep 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -179,8 +179,11 @@ def from_args(cls, args):
179179
180180 # Validate that all image prompts exist before expensive model load
181181 if image_prompts := getattr (args , "image_prompts" , None ):
182- if not all (os .path .exists (image_prompt ) for image_prompt in image_prompts ):
183- raise RuntimeError (f"Image prompt { image_prompt } does not exist" )
182+ non_existent_image_prompts = [
183+ image_prompt if (not os .path .exists (image_prompt )) for image_prompt in image_prompts
184+ ]
185+ if len (non_existent_image_prompts ):
186+ raise RuntimeError (f"Image prompt { non_existent_image_prompts } does not exist" )
184187
185188 return cls (
186189 prompt = getattr (args , "prompt" , "" ),
@@ -938,7 +941,7 @@ def chat(
938941 TransformerCrossAttentionLayer ,
939942 TransformerSelfAttentionLayer ,
940943 )
941- decoder = self .model .model .decoder
944+ decoder = self .model .model .decoder
942945 for m in reversed (list (decoder .modules ())):
943946 if isinstance (m , TransformerSelfAttentionLayer ) or isinstance (
944947 m , TransformerCrossAttentionLayer
You can’t perform that action at this time.
0 commit comments