Update app.py
Browse files
app.py
CHANGED
@@ -121,7 +121,7 @@ run_mode = "mod_only"
|
|
121 |
store_attn_map = False
|
122 |
run_name = time.strftime("%m%d-%H%M")
|
123 |
|
124 |
-
num_inputs =
|
125 |
|
126 |
images = []
|
127 |
captions = []
|
@@ -209,6 +209,7 @@ def generate_image(
|
|
209 |
prompt,
|
210 |
image_1, caption_1,
|
211 |
image_2 = None, caption_2 = None,
|
|
|
212 |
cond_size = 256,
|
213 |
target_height = 768,
|
214 |
target_width = 768,
|
@@ -241,7 +242,11 @@ def generate_image(
|
|
241 |
images.append(image_2)
|
242 |
captions.append(caption_2)
|
243 |
idips_checkboxes.append(True)
|
244 |
-
|
|
|
|
|
|
|
|
|
245 |
print(f"Length of images: {len(images)}")
|
246 |
print(f"Length of captions: {len(captions)}")
|
247 |
|
@@ -647,6 +652,7 @@ if __name__ == "__main__":
|
|
647 |
prompt,
|
648 |
images[0], captions[0],
|
649 |
images[1], captions[1],
|
|
|
650 |
cond_size,
|
651 |
target_height,
|
652 |
target_width,
|
|
|
121 |
store_attn_map = False
|
122 |
run_name = time.strftime("%m%d-%H%M")
|
123 |
|
124 |
+
num_inputs = 3
|
125 |
|
126 |
images = []
|
127 |
captions = []
|
|
|
209 |
prompt,
|
210 |
image_1, caption_1,
|
211 |
image_2 = None, caption_2 = None,
|
212 |
+
image_3 = None, caption_3 = None,
|
213 |
cond_size = 256,
|
214 |
target_height = 768,
|
215 |
target_width = 768,
|
|
|
242 |
images.append(image_2)
|
243 |
captions.append(caption_2)
|
244 |
idips_checkboxes.append(True)
|
245 |
+
elif image_3 != None:
|
246 |
+
images.append(image_3)
|
247 |
+
captions.append(caption_3)
|
248 |
+
idips_checkboxes.append(True)
|
249 |
+
|
250 |
print(f"Length of images: {len(images)}")
|
251 |
print(f"Length of captions: {len(captions)}")
|
252 |
|
|
|
652 |
prompt,
|
653 |
images[0], captions[0],
|
654 |
images[1], captions[1],
|
655 |
+
images[2], captions[2],
|
656 |
cond_size,
|
657 |
target_height,
|
658 |
target_width,
|