Commit
·
6222926
1
Parent(s):
b54fe6e
added first imports
Browse files- handler.py +11 -11
handler.py
CHANGED
@@ -11,23 +11,23 @@
|
|
11 |
# dtype = torch.bfloat16 if torch.cuda.get_device_capability(device.index)[0] >= 8 else torch.float16
|
12 |
|
13 |
# start_test
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
24 |
|
25 |
# import torch
|
26 |
# from pipeline_stable_diffusion_xl_instantid_full import StableDiffusionXLInstantIDPipeline, draw_kps
|
27 |
# from diffusers.pipelines.controlnet.multicontrolnet import MultiControlNetModel
|
28 |
|
29 |
# from controlnet_aux import OpenposeDetector
|
30 |
-
# from depth_anything.dpt import DepthAnything
|
31 |
|
32 |
# import torch.nn.functional as F
|
33 |
# from torchvision.transforms import Compose
|
|
|
11 |
# dtype = torch.bfloat16 if torch.cuda.get_device_capability(device.index)[0] >= 8 else torch.float16
|
12 |
|
13 |
# start_test
|
14 |
+
import cv2
|
15 |
+
import numpy as np
|
16 |
+
import diffusers
|
17 |
+
import PIL
|
18 |
+
from PIL import Image
|
19 |
+
|
20 |
+
from diffusers.models import ControlNetModel
|
21 |
+
from depth_anything.dpt import DepthAnything
|
22 |
+
from depth_anything.util.transform import Resize, NormalizeImage, PrepareForNet
|
23 |
+
from diffusers.utils import load_image
|
24 |
+
from insightface.app import FaceAnalysis
|
25 |
|
26 |
# import torch
|
27 |
# from pipeline_stable_diffusion_xl_instantid_full import StableDiffusionXLInstantIDPipeline, draw_kps
|
28 |
# from diffusers.pipelines.controlnet.multicontrolnet import MultiControlNetModel
|
29 |
|
30 |
# from controlnet_aux import OpenposeDetector
|
|
|
31 |
|
32 |
# import torch.nn.functional as F
|
33 |
# from torchvision.transforms import Compose
|