Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions extensions_built_in/audio_models/ace_step/ace_step_15_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,17 @@ def load_model(self):
self.vae = models["vae"]

# move back to device
self.model.to(device)
self.text_encoder.to(device)
if self.model_config.low_vram:
# Honor low_vram: keep the large transformer and text encoder on the CPU
# and let them be moved to the GPU on demand (see get_prompt_embeds,
# get_noise_prediction, generate_single_audio). Only the VAE needs to be
# resident for latent caching, which otherwise OOMs when the full quantized
# DiT + text encoder are also occupying VRAM.
self.model.to("cpu")
self.text_encoder.to("cpu")
else:
self.model.to(device)
self.text_encoder.to(device)
self.vae.to(device)
self.tokenizer = models["tokenizer"]

Expand Down