MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / HybridConditioner

Class HybridConditioner

ldm/modules/diffusionmodules/util.py:254–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252
253
254class HybridConditioner(nn.Module):
255
256 def __init__(self, c_concat_config, c_crossattn_config):
257 super().__init__()
258 self.concat_conditioner = instantiate_from_config(c_concat_config)
259 self.crossattn_conditioner = instantiate_from_config(c_crossattn_config)
260
261 def forward(self, c_concat, c_crossattn):
262 c_concat = self.concat_conditioner(c_concat)
263 c_crossattn = self.crossattn_conditioner(c_crossattn)
264 return {'c_concat': [c_concat], 'c_crossattn': [c_crossattn]}
265
266
267def noise_like(shape, device, repeat=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected