MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / forward

Method forward

src/diffusers/models/unets/unet_2d_blocks.py:746–753  ·  view source on GitHub ↗
(self, hidden_states: torch.FloatTensor, temb: Optional[torch.FloatTensor] = None)

Source from the content-addressed store, hash-verified

744 self.resnets = nn.ModuleList(resnets)
745
746 def forward(self, hidden_states: torch.FloatTensor, temb: Optional[torch.FloatTensor] = None) -> torch.FloatTensor:
747 hidden_states = self.resnets[0](hidden_states, temb)
748 for attn, resnet in zip(self.attentions, self.resnets[1:]):
749 if attn is not None:
750 hidden_states = attn(hidden_states, temb=temb)
751 hidden_states = resnet(hidden_states, temb)
752
753 return hidden_states
754
755
756class UNetMidBlock2DCrossAttn(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected