1inkusFace commited on
Commit
1d65527
·
verified ·
1 Parent(s): de609f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- sd_image_a.resize((height,width), Image.LANCZOS)
 
 
 
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,