MCPcopy Create free account
hub / github.com/DPS2022/diffusion-posterior-sampling / wrapper

Function wrapper

guided_diffusion/gaussian_diffusion.py:17–21  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

15
16def register_sampler(name: str):
17 def wrapper(cls):
18 if __SAMPLER__.get(name, None):
19 raise NameError(f"Name {name} is already registered!")
20 __SAMPLER__[name] = cls
21 return cls
22 return wrapper
23
24

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected