lorocksUMD commited on
Commit
7fe1960
·
verified ·
1 Parent(s): a3de5d2

Update multi_script.py

Browse files
Files changed (1) hide show
  1. multi_script.py +11 -1
multi_script.py CHANGED
@@ -127,7 +127,17 @@ conv.append_message(conv.roles[0], qs)
127
  conv.append_message(conv.roles[1], None)
128
  prompt = conv.get_prompt()
129
 
130
- image_files = image_parser(args)
 
 
 
 
 
 
 
 
 
 
131
  images = load_images(image_files)
132
  image_sizes = [x.size for x in images]
133
  images_tensor = process_images(
 
127
  conv.append_message(conv.roles[1], None)
128
  prompt = conv.get_prompt()
129
 
130
+ if ".jpg" in image_file or ".png" in image_file:
131
+ image_files = image_parser(args)
132
+ else:
133
+ import glob
134
+ import os
135
+ image_ext = ("*.png", '*.jpg')
136
+ image_files = []
137
+
138
+ for ext in image_ext:
139
+ image_files.extend(glob.glob(os.path.join(image_file, ext)))
140
+
141
  images = load_images(image_files)
142
  image_sizes = [x.size for x in images]
143
  images_tensor = process_images(