Commit
·
b81ee75
1
Parent(s):
06e49f5
test no coentrol net
Browse files- handler.py +6 -6
handler.py
CHANGED
@@ -61,8 +61,8 @@ CONTROLNET_MAPPING = {
|
|
61 |
class EndpointHandler():
|
62 |
def __init__(self, path=""):
|
63 |
# define default controlnet id and load controlnet
|
64 |
-
self.control_type = "depth"
|
65 |
-
self.controlnet = ControlNetModel.from_pretrained(CONTROLNET_MAPPING[self.control_type]["model_id"],torch_dtype=dtype).to(device)
|
66 |
|
67 |
#processor = AutoProcessor.from_pretrained("CompVis/stable-diffusion-safety-checker")
|
68 |
|
@@ -71,10 +71,10 @@ class EndpointHandler():
|
|
71 |
#self.stable_diffusion_id = "runwayml/stable-diffusion-v1-5"
|
72 |
self.stable_diffusion_id = "Lykon/dreamshaper-8"
|
73 |
|
74 |
-
self.pipe = StableDiffusionControlNetPipeline.from_pretrained(self.stable_diffusion_id,
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
# Define Generator with seed
|
79 |
self.generator = torch.Generator(device=device.type).manual_seed(3)
|
80 |
|
|
|
61 |
class EndpointHandler():
|
62 |
def __init__(self, path=""):
|
63 |
# define default controlnet id and load controlnet
|
64 |
+
#self.control_type = "depth"
|
65 |
+
#self.controlnet = ControlNetModel.from_pretrained(CONTROLNET_MAPPING[self.control_type]["model_id"],torch_dtype=dtype).to(device)
|
66 |
|
67 |
#processor = AutoProcessor.from_pretrained("CompVis/stable-diffusion-safety-checker")
|
68 |
|
|
|
71 |
#self.stable_diffusion_id = "runwayml/stable-diffusion-v1-5"
|
72 |
self.stable_diffusion_id = "Lykon/dreamshaper-8"
|
73 |
|
74 |
+
#self.pipe = StableDiffusionControlNetPipeline.from_pretrained(self.stable_diffusion_id,
|
75 |
+
# controlnet=self.controlnet,
|
76 |
+
# torch_dtype=dtype,
|
77 |
+
# safety_checker=StableDiffusionSafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker", torch_dtype=dtype)).to("cuda")
|
78 |
# Define Generator with seed
|
79 |
self.generator = torch.Generator(device=device.type).manual_seed(3)
|
80 |
|