Spaces:
Running
Running
OmPrakashSingh1704
commited on
Commit
·
94a2d08
1
Parent(s):
30f2818
update
Browse files
options/Banner_Model/Image2Image_2.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import torch
|
2 |
from controlnet_aux import LineartDetector
|
3 |
-
from diffusers import ControlNetModel,UniPCMultistepScheduler,
|
4 |
from PIL import Image
|
5 |
|
6 |
device= "cuda" if torch.cuda.is_available() else "cpu"
|
@@ -9,7 +9,7 @@ processor = LineartDetector.from_pretrained("lllyasviel/Annotators")
|
|
9 |
|
10 |
checkpoint = "ControlNet-1-1-preview/control_v11p_sd15_lineart"
|
11 |
controlnet = ControlNetModel.from_pretrained(checkpoint, torch_dtype=torch.float16).to(device)
|
12 |
-
pipe =
|
13 |
"radames/stable-diffusion-v1-5-img2img", controlnet=controlnet, torch_dtype=torch.float16
|
14 |
).to(device)
|
15 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
|
|
1 |
import torch
|
2 |
from controlnet_aux import LineartDetector
|
3 |
+
from diffusers import ControlNetModel,UniPCMultistepScheduler,StableDiffusionControlNetPipeline
|
4 |
from PIL import Image
|
5 |
|
6 |
device= "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
9 |
|
10 |
checkpoint = "ControlNet-1-1-preview/control_v11p_sd15_lineart"
|
11 |
controlnet = ControlNetModel.from_pretrained(checkpoint, torch_dtype=torch.float16).to(device)
|
12 |
+
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
13 |
"radames/stable-diffusion-v1-5-img2img", controlnet=controlnet, torch_dtype=torch.float16
|
14 |
).to(device)
|
15 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
options/Banner_Model/__pycache__/Image2Image_2.cpython-310.pyc
CHANGED
Binary files a/options/Banner_Model/__pycache__/Image2Image_2.cpython-310.pyc and b/options/Banner_Model/__pycache__/Image2Image_2.cpython-310.pyc differ
|
|