MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / unwrap_model

Function unwrap_model

diffusers/examples/controlnet/train_controlnet_flux.py:936–939  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

934 flux_controlnet_pipeline.to(accelerator.device)
935
936 def unwrap_model(model):
937 model = accelerator.unwrap_model(model)
938 model = model._orig_mod if is_compiled_module(model) else model
939 return model
940
941 # `accelerate` 0.16.0 will have better support for customized saving
942 if version.parse(accelerate.__version__) >= version.parse("0.16.0"):

Callers 1

mainFunction · 0.70

Calls 1

is_compiled_moduleFunction · 0.90

Tested by

no test coverage detected