Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -6,11 +6,12 @@ os.makedirs("/workspace/.cache/huggingface", exist_ok=True)
|
|
| 6 |
|
| 7 |
import torch
|
| 8 |
from diffusers import StableDiffusionImg2ImgPipeline
|
|
|
|
| 9 |
from PIL import Image
|
| 10 |
|
| 11 |
|
| 12 |
# --- Place any download or path setup here ---
|
| 13 |
-
MODEL_ID = "runwayml/stable-diffusion-v1-5" # Can swap for custom path if using IP-Adapter
|
| 14 |
DEVICE = "cpu"
|
| 15 |
MODEL_CACHE = "/workspace/.cache/huggingface"
|
| 16 |
|
|
|
|
| 6 |
|
| 7 |
import torch
|
| 8 |
from diffusers import StableDiffusionImg2ImgPipeline
|
| 9 |
+
from ip_adapter import IPAdapter
|
| 10 |
from PIL import Image
|
| 11 |
|
| 12 |
|
| 13 |
# --- Place any download or path setup here ---
|
| 14 |
+
MODEL_ID ="ip_adapter/ip-adapter_sd15.bin" #"runwayml/stable-diffusion-v1-5" # Can swap for custom path if using IP-Adapter
|
| 15 |
DEVICE = "cpu"
|
| 16 |
MODEL_CACHE = "/workspace/.cache/huggingface"
|
| 17 |
|