MCPcopy
hub / github.com/lllyasviel/FramePack / unload_complete_models

Function unload_complete_models

diffusers_helper/memory.py:116–123  ·  view source on GitHub ↗
(*args)

Source from the content-addressed store, hash-verified

114
115
116def unload_complete_models(*args):
117 for m in gpu_complete_modules + list(args):
118 m.to(device=cpu)
119 print(f'Unloaded {m.__class__.__name__} as complete.')
120
121 gpu_complete_modules.clear()
122 torch.cuda.empty_cache()
123 return
124
125
126def load_model_as_complete(model, target_device, unload=True):

Callers 3

workerFunction · 0.90
workerFunction · 0.90
load_model_as_completeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected