Spaces:
Running
on
Zero
Running
on
Zero
wondervictor
commited on
Update preprocessor.py
Browse files- preprocessor.py +3 -3
preprocessor.py
CHANGED
@@ -9,7 +9,7 @@ from controlnet_aux import (
|
|
9 |
HEDdetector,
|
10 |
# LineartAnimeDetector,
|
11 |
LineartDetector,
|
12 |
-
|
13 |
# MLSDdetector,
|
14 |
# NormalBaeDetector,
|
15 |
# OpenposeDetector,
|
@@ -74,8 +74,8 @@ class Preprocessor:
|
|
74 |
elif name == "Canny":
|
75 |
self.model = CannyDetector()
|
76 |
elif name == "Depth":
|
77 |
-
self.model = DepthEstimator()
|
78 |
-
|
79 |
else:
|
80 |
raise ValueError
|
81 |
torch.cuda.empty_cache()
|
|
|
9 |
HEDdetector,
|
10 |
# LineartAnimeDetector,
|
11 |
LineartDetector,
|
12 |
+
MidasDetector,
|
13 |
# MLSDdetector,
|
14 |
# NormalBaeDetector,
|
15 |
# OpenposeDetector,
|
|
|
74 |
elif name == "Canny":
|
75 |
self.model = CannyDetector()
|
76 |
elif name == "Depth":
|
77 |
+
# self.model = DepthEstimator()
|
78 |
+
self.model = MidasDetector.from_pretrained(self.MODEL_ID)
|
79 |
else:
|
80 |
raise ValueError
|
81 |
torch.cuda.empty_cache()
|