mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-05 23:49:57 +00:00
add a way to empty cuda cache on the fly
This commit is contained in:
@@ -187,6 +187,9 @@ def calc_cond_uncond_batch(model, cond, uncond, x_in, timestep, model_options):
|
||||
to_batch_temp.reverse()
|
||||
to_batch = to_batch_temp[:1]
|
||||
|
||||
if memory_management.signal_empty_cache:
|
||||
memory_management.soft_empty_cache()
|
||||
|
||||
free_memory = memory_management.get_free_memory(x_in.device)
|
||||
|
||||
if (not args.disable_gpu_warning) and x_in.device.type == 'cuda':
|
||||
|
||||
Reference in New Issue
Block a user