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

Method forward

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

Source from the content-addressed store, hash-verified

2830 self.resolution_idx = resolution_idx
2831
2832 def forward(
2833 self, hidden_states: torch.FloatTensor, temb: Optional[torch.FloatTensor] = None, scale: float = 1.0
2834 ) -> torch.FloatTensor:
2835 for resnet in self.resnets:
2836 hidden_states = resnet(hidden_states, temb=temb, scale=scale)
2837
2838 if self.upsamplers is not None:
2839 for upsampler in self.upsamplers:
2840 hidden_states = upsampler(hidden_states)
2841
2842 return hidden_states
2843
2844
2845class AttnUpDecoderBlock2D(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected