mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
Do not ignore offload with FramePack
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user