Update app.py
Browse files
app.py
CHANGED
@@ -109,7 +109,10 @@ def infer(
|
|
109 |
if latent_file:
|
110 |
sd_image_a = Image.open(latent_file.name).convert('RGB')
|
111 |
print("-- using image file and loading ip-adapter --")
|
112 |
-
|
|
|
|
|
|
|
113 |
pipe.init_ipadapter(
|
114 |
ip_adapter_path=ipadapter_path,
|
115 |
image_encoder_path=image_encoder_path,
|
|
|
109 |
if latent_file:
|
110 |
sd_image_a = Image.open(latent_file.name).convert('RGB')
|
111 |
print("-- using image file and loading ip-adapter --")
|
112 |
+
if image_encoder_path=="laion/CLIP-ViT-H-14-laion2B-s32B-b79K":
|
113 |
+
sd_image_a.resize((384,384), Image.LANCZOS)
|
114 |
+
else:
|
115 |
+
sd_image_a.resize((height,width), Image.LANCZOS)
|
116 |
pipe.init_ipadapter(
|
117 |
ip_adapter_path=ipadapter_path,
|
118 |
image_encoder_path=image_encoder_path,
|