free memory

This commit is contained in:
Haoming 2025-10-03 14:23:59 +08:00
parent e6a65a3efd
commit 0850d29559
2 changed files with 2 additions and 1 deletions

View File

@ -54,7 +54,6 @@ class CFGDenoiser(torch.nn.Module):
self.padded_cond_uncond = False
self.padded_cond_uncond_v0 = False
self.sampler = sampler
self.model_wrap = None
self.p = None
self.need_last_noise_uncond = False

View File

@ -180,6 +180,8 @@ def apply_refiner(cfg_denoiser, x, sigma):
if not checkpoint_changed:
return False
del cfg_denoiser.model_wrap
try:
main_entry.refresh_model_loading_parameters()
sd_models.forge_model_reload()