MCPcopy Create free account
hub / github.com/Francis-Rings/FlashPortrait / unwrap_model

Function unwrap_model

train_portrait.py:1136–1139  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

1134
1135 # Function for unwrapping if model was compiled with `torch.compile`.
1136 def unwrap_model(model):
1137 model = accelerator.unwrap_model(model)
1138 model = model._orig_mod if is_compiled_module(model) else model
1139 return model
1140
1141 # Train!
1142 total_batch_size = args.train_batch_size * accelerator.num_processes * args.gradient_accumulation_steps

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected