rynmurdock commited on
Commit
4ff37ea
1 Parent(s): 2da41ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ from sklearn.svm import LinearSVC
6
  from sklearn import preprocessing
7
  import pandas as pd
8
 
 
9
  from diffusers import LCMScheduler, AutoencoderTiny, EulerDiscreteScheduler, UNet2DConditionModel, StableDiffusionXLPipeline
10
  from diffusers.models import ImageProjection
11
  from patch_sdxl import SDEmb
@@ -41,7 +42,7 @@ pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taesdxl", torch_dtype=to
41
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
42
  pipe.to(device='cuda')
43
 
44
- image_encoder = CLIPimg.from_pretrained('h94/IP-Adapter', subfolder='sdxl_models/image_encoder', torch_dtype=torch.float16).to(device)
45
  pipe.unet._load_ip_adapter_weights(torch.load(hf_hub_download('h94/IP-Adapter', 'sdxl_models/ip-adapter_sdxl.bin'), map_location="cpu"))
46
  pipe.register_modules(image_encoder = image_encoder)
47
 
 
6
  from sklearn import preprocessing
7
  import pandas as pd
8
 
9
+ from transformers import CLIPVisionModelWithProjection
10
  from diffusers import LCMScheduler, AutoencoderTiny, EulerDiscreteScheduler, UNet2DConditionModel, StableDiffusionXLPipeline
11
  from diffusers.models import ImageProjection
12
  from patch_sdxl import SDEmb
 
42
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
43
  pipe.to(device='cuda')
44
 
45
+ image_encoder = CLIPVisionModelWithProjection.from_pretrained('h94/IP-Adapter', subfolder='sdxl_models/image_encoder', torch_dtype=torch.float16).to(device)
46
  pipe.unet._load_ip_adapter_weights(torch.load(hf_hub_download('h94/IP-Adapter', 'sdxl_models/ip-adapter_sdxl.bin'), map_location="cpu"))
47
  pipe.register_modules(image_encoder = image_encoder)
48