Do not ignore offload with FramePack

This commit is contained in:
Disty0
2025-07-13 20:41:55 +03:00
parent 4e449ca9b2
commit 3087b8d8cd
3 changed files with 15 additions and 13 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ def vae_decode_remote(latents):
def vae_decode_full(latents):
with devices.inference_context():
vae = shared.sd_model.vae
latents = (latents / vae.config.scaling_factor).to(device=vae.device, dtype=vae.dtype)
latents = (latents / vae.config.scaling_factor).to(device=devices.device, dtype=devices.dtype)
images = vae.decode(latents).sample
return images
@@ -91,6 +91,6 @@ def vae_decode(latents, vae_type):
def vae_encode(image):
with devices.inference_context():
vae = shared.sd_model.vae
latents = vae.encode(image.to(device=vae.device, dtype=vae.dtype)).latent_dist.sample()
latents = vae.encode(image.to(device=devices.device, dtype=devices.dtype)).latent_dist.sample()
latents = latents * vae.config.scaling_factor
return latents