Update handler.py
Browse files- handler.py +5 -1
handler.py
CHANGED
|
@@ -4,7 +4,7 @@ import torch
|
|
| 4 |
import diffusers
|
| 5 |
from PIL import Image
|
| 6 |
|
| 7 |
-
# Import the custom pipeline from models directory
|
| 8 |
from models.pipeline_stable_diffusion_xl_instantid_full import StableDiffusionXLInstantIDPipeline
|
| 9 |
|
| 10 |
app = FastAPI()
|
|
@@ -13,6 +13,10 @@ app = FastAPI()
|
|
| 13 |
pretrained_model_name_or_path = "wangqixun/YamerMIX_v8"
|
| 14 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
pipe = StableDiffusionXLInstantIDPipeline.from_pretrained(
|
| 17 |
pretrained_model_name_or_path,
|
| 18 |
controlnet=[controlnet_identitynet],
|
|
|
|
| 4 |
import diffusers
|
| 5 |
from PIL import Image
|
| 6 |
|
| 7 |
+
# Import the custom pipeline from the models directory
|
| 8 |
from models.pipeline_stable_diffusion_xl_instantid_full import StableDiffusionXLInstantIDPipeline
|
| 9 |
|
| 10 |
app = FastAPI()
|
|
|
|
| 13 |
pretrained_model_name_or_path = "wangqixun/YamerMIX_v8"
|
| 14 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 15 |
|
| 16 |
+
# Initialize controlnet_identitynet - replace with your actual initialization code
|
| 17 |
+
controlnet_identitynet = None
|
| 18 |
+
face_adapter = None
|
| 19 |
+
|
| 20 |
pipe = StableDiffusionXLInstantIDPipeline.from_pretrained(
|
| 21 |
pretrained_model_name_or_path,
|
| 22 |
controlnet=[controlnet_identitynet],
|