MCPcopy Create free account
hub / github.com/00why00/JoDiffusion / unwrap_model

Function unwrap_model

train_ldm.py:705–708  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

703
704 # Function for unwrapping if model was compiled with `torch.compile`.
705 def unwrap_model(model):
706 model = accelerator.unwrap_model(model)
707 model = model._orig_mod if is_compiled_module(model) else model
708 return model
709
710 # Train!
711 total_batch_size = args.train_batch_size * accelerator.num_processes * args.gradient_accumulation_steps

Callers 2

save_model_hookFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected