MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / free_model

Function free_model

wan/distributed/fsdp.py:37–43  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

35
36
37def free_model(model):
38 for m in model.modules():
39 if isinstance(m, FSDP):
40 _free_storage(m._handle.flat_param.data)
41 del model
42 gc.collect()
43 torch.cuda.empty_cache()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected