Update sdfile.py
Browse files
sdfile.py
CHANGED
@@ -22,12 +22,12 @@ def get_pipelines( name:PIPELINES, enable_cpu_offload = False, ) -> StableDiffus
|
|
22 |
|
23 |
if name == "txt2img":
|
24 |
pipe = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
|
25 |
-
pipe.unet.load_attn_procs("
|
26 |
pipe.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
27 |
elif name == "sketch2img":
|
28 |
controlnet = ControlNetModel.from_pretrained("Abhi5ingh/model_dresscode", torch_dtype=torch.float16)
|
29 |
pipe = StableDiffusionControlNetPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", controlnet = controlnet, torch_dtype = torch.float16)
|
30 |
-
pipe.unet.load_attn_procs("
|
31 |
pipe.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
32 |
|
33 |
if pipe is None:
|
|
|
22 |
|
23 |
if name == "txt2img":
|
24 |
pipe = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
|
25 |
+
pipe.unet.load_attn_procs("./")
|
26 |
pipe.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
27 |
elif name == "sketch2img":
|
28 |
controlnet = ControlNetModel.from_pretrained("Abhi5ingh/model_dresscode", torch_dtype=torch.float16)
|
29 |
pipe = StableDiffusionControlNetPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", controlnet = controlnet, torch_dtype = torch.float16)
|
30 |
+
pipe.unet.load_attn_procs("./")
|
31 |
pipe.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
32 |
|
33 |
if pipe is None:
|