Skip to content

Commit

Permalink
Fix sequential offloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Disty0 committed Aug 19, 2023
1 parent 87bb354 commit 5b7f873
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/processing_diffusers.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def full_vae_decode(latents, model):
unet_device = model.unet.device
model.unet.to(devices.cpu)
devices.torch_gc()
model.vae.to(devices.device)
if not shared.cmd_opts.lowvram and not shared.opts.diffusers_seq_cpu_offload:
model.vae.to(devices.device)
latents.to(model.vae.device)
decoded = model.vae.decode(latents / model.vae.config.scaling_factor, return_dict=False)[0]
if shared.opts.diffusers_move_unet and not model.has_accelerate:
Expand Down

0 comments on commit 5b7f873

Please sign in to comment.