Spaces:
Sleeping
Sleeping
Update utils.py
Browse files10 unmodified lines1112131414151617187 unmodified lines262728293031323334353610 unmodified lines
# --- Place any download or path setup here ---MODEL_ID ="ip_adapter/ip-adapter_sd15.bin" #"runwayml/stable-diffusion-v1-5" # Can swap for custom path if using IP-AdapterMODEL_ID ="runwayml/stable-diffusion-v1-5" # Can swap for custom path if using IP-AdapterADAPTER_PATH = "/workspace/.cache/huggingface/ip_adapter/ip-adapter_sd15.bin"DEVICE = "cpu"MODEL_CACHE = "/workspace/.cache/huggingface"
7 unmodified lines # safety_checker=None, # Disable for demo/testing; enable in prod).to(DEVICE)
pipe.load_ip_adapter( pretrained_model_name_or_path=ADAPTER_PATH, # Optionally: subfolder="models" if using the repo, not a direct path)
def generate_sticker(input_image, prompt): """ Given a user image and a prompt, generates a sticker/emoji-style portrait.utils.py+7-1