Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -132,20 +132,17 @@ eulera_scheduler = EulerAncestralDiscreteScheduler.from_pretrained("stabilityai/
|
|
132 |
# Download the model files
|
133 |
ckpt_dir_pony = snapshot_download(repo_id="John6666/pony-realism-v21main-sdxl")
|
134 |
ckpt_dir_cyber = snapshot_download(repo_id="John6666/cyberrealistic-pony-v61-sdxl")
|
135 |
-
ckpt_dir_stallion = snapshot_download(repo_id="John6666/stallion-dreams-pony-realistic-v1-sdxl")
|
136 |
ckpt_dir_stable = snapshot_download(repo_id="stabilityai/stable-diffusion-xl-base-1.0")
|
137 |
|
138 |
|
139 |
# Load the models
|
140 |
vae_pony = AutoencoderKL.from_pretrained(os.path.join(ckpt_dir_pony, "vae"), torch_dtype=torch.float16)
|
141 |
vae_cyber = AutoencoderKL.from_pretrained(os.path.join(ckpt_dir_cyber, "vae"), torch_dtype=torch.float16)
|
142 |
-
vae_stallion = AutoencoderKL.from_pretrained(os.path.join(ckpt_dir_stallion, "vae"), torch_dtype=torch.float16)
|
143 |
vae_stable = AutoencoderKL.from_pretrained(os.path.join(ckpt_dir_stable, "vae"), torch_dtype=torch.float16)
|
144 |
|
145 |
|
146 |
controlnet_pony = ControlNetModel.from_pretrained("xinsir/controlnet-union-sdxl-1.0", torch_dtype=torch.float16)
|
147 |
controlnet_cyber = ControlNetModel.from_pretrained("xinsir/controlnet-union-sdxl-1.0", torch_dtype=torch.float16)
|
148 |
-
controlnet_stallion = ControlNetModel.from_pretrained("xinsir/controlnet-union-sdxl-1.0", torch_dtype=torch.float16)
|
149 |
controlnet_stable = ControlNetModel.from_pretrained("xinsir/controlnet-union-sdxl-1.0", torch_dtype=torch.float16)
|
150 |
|
151 |
pipe_pony = StableDiffusionXLControlNetPipeline.from_pretrained(
|
@@ -154,9 +151,6 @@ pipe_pony = StableDiffusionXLControlNetPipeline.from_pretrained(
|
|
154 |
pipe_cyber = StableDiffusionXLControlNetPipeline.from_pretrained(
|
155 |
ckpt_dir_cyber, controlnet=controlnet_cyber, vae=vae_cyber, torch_dtype=torch.float16, scheduler=eulera_scheduler
|
156 |
)
|
157 |
-
pipe_stallion = StableDiffusionXLControlNetPipeline.from_pretrained(
|
158 |
-
ckpt_dir_stallion, controlnet=controlnet_stallion, vae=vae_stallion, torch_dtype=torch.float16, scheduler=eulera_scheduler
|
159 |
-
)
|
160 |
pipe_stable = StableDiffusionXLControlNetPipeline.from_pretrained(
|
161 |
ckpt_dir_stable, controlnet=controlnet_stable, vae=vae_stable, torch_dtype=torch.float16, scheduler=eulera_scheduler
|
162 |
)
|
@@ -248,8 +242,6 @@ def run(
|
|
248 |
pipe = pipe_pony
|
249 |
elif model_choice == "Cyber Realistic Pony v61":
|
250 |
pipe = pipe_cyber
|
251 |
-
elif model_choice == "Stallion Dreams Pony Realistic v1":
|
252 |
-
pipe = pipe_stallion
|
253 |
else:
|
254 |
raise ValueError("Invalid model choice")
|
255 |
|
|
|
132 |
# Download the model files
|
133 |
ckpt_dir_pony = snapshot_download(repo_id="John6666/pony-realism-v21main-sdxl")
|
134 |
ckpt_dir_cyber = snapshot_download(repo_id="John6666/cyberrealistic-pony-v61-sdxl")
|
|
|
135 |
ckpt_dir_stable = snapshot_download(repo_id="stabilityai/stable-diffusion-xl-base-1.0")
|
136 |
|
137 |
|
138 |
# Load the models
|
139 |
vae_pony = AutoencoderKL.from_pretrained(os.path.join(ckpt_dir_pony, "vae"), torch_dtype=torch.float16)
|
140 |
vae_cyber = AutoencoderKL.from_pretrained(os.path.join(ckpt_dir_cyber, "vae"), torch_dtype=torch.float16)
|
|
|
141 |
vae_stable = AutoencoderKL.from_pretrained(os.path.join(ckpt_dir_stable, "vae"), torch_dtype=torch.float16)
|
142 |
|
143 |
|
144 |
controlnet_pony = ControlNetModel.from_pretrained("xinsir/controlnet-union-sdxl-1.0", torch_dtype=torch.float16)
|
145 |
controlnet_cyber = ControlNetModel.from_pretrained("xinsir/controlnet-union-sdxl-1.0", torch_dtype=torch.float16)
|
|
|
146 |
controlnet_stable = ControlNetModel.from_pretrained("xinsir/controlnet-union-sdxl-1.0", torch_dtype=torch.float16)
|
147 |
|
148 |
pipe_pony = StableDiffusionXLControlNetPipeline.from_pretrained(
|
|
|
151 |
pipe_cyber = StableDiffusionXLControlNetPipeline.from_pretrained(
|
152 |
ckpt_dir_cyber, controlnet=controlnet_cyber, vae=vae_cyber, torch_dtype=torch.float16, scheduler=eulera_scheduler
|
153 |
)
|
|
|
|
|
|
|
154 |
pipe_stable = StableDiffusionXLControlNetPipeline.from_pretrained(
|
155 |
ckpt_dir_stable, controlnet=controlnet_stable, vae=vae_stable, torch_dtype=torch.float16, scheduler=eulera_scheduler
|
156 |
)
|
|
|
242 |
pipe = pipe_pony
|
243 |
elif model_choice == "Cyber Realistic Pony v61":
|
244 |
pipe = pipe_cyber
|
|
|
|
|
245 |
else:
|
246 |
raise ValueError("Invalid model choice")
|
247 |
|