MCPcopy Create free account
hub / github.com/blepping/ComfyUI-bleh / PatchTypeSamplerPostCfgFunction

Class PatchTypeSamplerPostCfgFunction

py/nodes/modelPatchConditional.py:110–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108
109
110class PatchTypeSamplerPostCfgFunction(PatchTypeModel):
111 def get_patches(self, model_options):
112 return model_options.get(self.name, ())
113
114 def set_patches(self, model_options, val):
115 model_options[self.name] = val
116
117 _call_result_key = "denoised"
118
119 @classmethod
120 def _call(cls, patches, opts):
121 if not patches:
122 return opts["denoised"]
123 curr_opts = opts.copy()
124 key = cls._call_result_key
125 for p in patches:
126 result = p(curr_opts)
127 curr_opts[key] = result
128 return result
129
130
131class PatchTypeSamplerPreCfgFunction(PatchTypeSamplerPostCfgFunction):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected