Spaces:
Sleeping
Sleeping
Tonioesparza
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ from PIL import Image, ImageDraw, ImageFont
|
|
7 |
import torch
|
8 |
from PIL import Image
|
9 |
from diffusers.utils import load_image
|
|
|
10 |
from diffusers import StableDiffusionXLImg2ImgPipeline, DPMSolverMultistepScheduler, AutoencoderTiny, StableDiffusionXLControlNetPipeline, ControlNetModel
|
11 |
from diffusers.utils import load_image
|
12 |
from diffusers.image_processor import IPAdapterMaskProcessor
|
@@ -64,7 +65,7 @@ controlnets = [
|
|
64 |
|
65 |
pipe_CN = StableDiffusionXLControlNetPipeline.from_pretrained("SG161222/RealVisXL_V5.0", torch_dtype=torch.float16,controlnet=[controlnets[0],controlnets[0],controlnets[1]], use_safetensors=True, variant='fp16')
|
66 |
pipe_CN.vae = AutoencoderTiny.from_pretrained("madebyollin/taesdxl", torch_dtype=torch.float16)
|
67 |
-
pipe_CN.scheduler=
|
68 |
pipe_CN.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name="ip-adapter_sdxl.bin")
|
69 |
pipe_CN.to("cuda")
|
70 |
|
|
|
7 |
import torch
|
8 |
from PIL import Image
|
9 |
from diffusers.utils import load_image
|
10 |
+
from diffusers import DPMSolverSDEScheduler
|
11 |
from diffusers import StableDiffusionXLImg2ImgPipeline, DPMSolverMultistepScheduler, AutoencoderTiny, StableDiffusionXLControlNetPipeline, ControlNetModel
|
12 |
from diffusers.utils import load_image
|
13 |
from diffusers.image_processor import IPAdapterMaskProcessor
|
|
|
65 |
|
66 |
pipe_CN = StableDiffusionXLControlNetPipeline.from_pretrained("SG161222/RealVisXL_V5.0", torch_dtype=torch.float16,controlnet=[controlnets[0],controlnets[0],controlnets[1]], use_safetensors=True, variant='fp16')
|
67 |
pipe_CN.vae = AutoencoderTiny.from_pretrained("madebyollin/taesdxl", torch_dtype=torch.float16)
|
68 |
+
pipe_CN.scheduler=DPMSolverSDEScheduler.from_pretrained("SG161222/RealVisXL_V5.0",subfolder="scheduler",use_karras_sigmas=True)
|
69 |
pipe_CN.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name="ip-adapter_sdxl.bin")
|
70 |
pipe_CN.to("cuda")
|
71 |
|