Update app.py
Browse files
app.py
CHANGED
|
@@ -107,12 +107,12 @@ def infer(
|
|
| 107 |
enhanced_prompt = prompt
|
| 108 |
enhanced_prompt_2 = prompt
|
| 109 |
if latent_file:
|
| 110 |
-
sd_image_a = Image.open(latent_file.name)
|
| 111 |
print("-- using image file and loading ip-adapter --")
|
| 112 |
-
if image_encoder_path=="laion/CLIP-ViT-H-14-laion2B-s32B-b79K":
|
| 113 |
-
|
| 114 |
-
else:
|
| 115 |
-
|
| 116 |
pipe.init_ipadapter(
|
| 117 |
ip_adapter_path=ipadapter_path,
|
| 118 |
image_encoder_path=image_encoder_path,
|
|
|
|
| 107 |
enhanced_prompt = prompt
|
| 108 |
enhanced_prompt_2 = prompt
|
| 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,
|