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

Function unwrap_model

train_ae.py:527–530  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

525
526 # Function for unwrapping if model was compiled with `torch.compile`.
527 def unwrap_model(model):
528 model = accelerator.unwrap_model(model)
529 model = model._orig_mod if is_compiled_module(model) else model
530 return model
531
532 # Train!
533 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