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

Function unwrap_model

diffusers/examples/controlnet/train_controlnet_sdxl.py:902–905  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

900 controlnet = ControlNetModel.from_unet(unet)
901
902 def unwrap_model(model):
903 model = accelerator.unwrap_model(model)
904 model = model._orig_mod if is_compiled_module(model) else model
905 return model
906
907 # `accelerate` 0.16.0 will have better support for customized saving
908 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