Spaces:
Sleeping
Sleeping
Update utils.py
Browse files40 unmodified lines41424344454647484950515240 unmodified lines# Load vision encoder and processor for IP-Adapter embeddingvision_encoder = CLIPVisionModelWithProjection.from_pretrained(f"{IPADAPTER_REPO}/clip_vision_model",cache_dir=CACHE_DIR,)image_processor = CLIPImageProcessor.from_pretrained(f"{IPADAPTER_REPO}/clip_vision_model",cache_dir=CACHE_DIR,)def generate_sticker(input_image: Image.Image, prompt: str):40 unmodified lines41424344454647484950515253545540 unmodified lines# Load vision encoder and processor for IP-Adapter embeddingvision_encoder = CLIPVisionModelWithProjection.from_pretrained("h94/IP-Adapter", # repo_id (main IP-Adapter repo)subfolder="clip_vision_model",# subfolder within the repo!cache_dir=CACHE_DIR)image_processor = CLIPImageProcessor.from_pretrained("h94/IP-Adapter",subfolder="clip_vision_model",cache_dir=CACHE_DIR)def generate_sticker(input_image: Image.Image, prompt: str):
utils.py+7-4