mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-02-01 19:22:59 +08:00
call torch_gc() to fix VRAM usage spike when call decode_first_stage()
This commit is contained in:
parent
380e9a84c3
commit
71b430f703
@ -53,6 +53,7 @@ def setup_for_low_vram(sd_model, use_medvram):
|
|||||||
|
|
||||||
if module_in_gpu is not None:
|
if module_in_gpu is not None:
|
||||||
module_in_gpu.to(cpu)
|
module_in_gpu.to(cpu)
|
||||||
|
devices.torch_gc()
|
||||||
|
|
||||||
module.to(devices.device)
|
module.to(devices.device)
|
||||||
module_in_gpu = module
|
module_in_gpu = module
|
||||||
|
Loading…
Reference in New Issue
Block a user