def zero_module(module):
    """Zero out the parameters of a module and return it."""
    for p in module.parameters():
        nn.init.zeros_(p)
    return module
Zero out the parameters of a module and return it.
examples/community/pipeline_faithdiff_stable_diffusion_xl.py