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

Function wrapper

guided_diffusion/condition_methods.py:7–11  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

5
6def register_conditioning_method(name: str):
7 def wrapper(cls):
8 if __CONDITIONING_METHOD__.get(name, None):
9 raise NameError(f"Name {name} is already registered!")
10 __CONDITIONING_METHOD__[name] = cls
11 return cls
12 return wrapper
13
14def get_conditioning_method(name: str, operator, noiser, **kwargs):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected