mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-01 05:11:19 -08:00
call torch_gc() to fix VRAM usage spike when call decode_first_stage()
This commit is contained in:
parent
380e9a84c3
commit
71b430f703
1 changed files with 1 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ def setup_for_low_vram(sd_model, use_medvram):
|
|||
|
||||
if module_in_gpu is not None:
|
||||
module_in_gpu.to(cpu)
|
||||
devices.torch_gc()
|
||||
|
||||
module.to(devices.device)
|
||||
module_in_gpu = module
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue