Update app.py
Browse files
app.py
CHANGED
@@ -144,10 +144,10 @@ controlnet_canny = ControlNetModel.from_pretrained(
|
|
144 |
torch_dtype=torch.float16
|
145 |
)
|
146 |
# when test with other base model, you need to change the vae also.
|
147 |
-
vae = AutoencoderKL.from_pretrained("
|
148 |
|
149 |
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
|
150 |
-
"
|
151 |
controlnet=controlnet,
|
152 |
vae=vae,
|
153 |
torch_dtype=torch.float16,
|
@@ -156,14 +156,13 @@ pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
|
|
156 |
pipe.to(device)
|
157 |
# Load model.
|
158 |
pipe_canny = StableDiffusionXLControlNetPipeline.from_pretrained(
|
159 |
-
"
|
160 |
controlnet=controlnet_canny,
|
161 |
vae=vae,
|
162 |
safety_checker=None,
|
163 |
torch_dtype=torch.float16,
|
164 |
scheduler=eulera_scheduler,
|
165 |
)
|
166 |
-
|
167 |
pipe_canny.to(device)
|
168 |
|
169 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
144 |
torch_dtype=torch.float16
|
145 |
)
|
146 |
# when test with other base model, you need to change the vae also.
|
147 |
+
vae = AutoencoderKL.from_pretrained("John6666/pony-realism-v21main-sdxl", subfolder="vae", torch_dtype=torch.float16)
|
148 |
|
149 |
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
|
150 |
+
"John6666/pony-realism-v21main-sdxl",
|
151 |
controlnet=controlnet,
|
152 |
vae=vae,
|
153 |
torch_dtype=torch.float16,
|
|
|
156 |
pipe.to(device)
|
157 |
# Load model.
|
158 |
pipe_canny = StableDiffusionXLControlNetPipeline.from_pretrained(
|
159 |
+
"John6666/pony-realism-v21main-sdxl",
|
160 |
controlnet=controlnet_canny,
|
161 |
vae=vae,
|
162 |
safety_checker=None,
|
163 |
torch_dtype=torch.float16,
|
164 |
scheduler=eulera_scheduler,
|
165 |
)
|
|
|
166 |
pipe_canny.to(device)
|
167 |
|
168 |
MAX_SEED = np.iinfo(np.int32).max
|