MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / block_tile_forward

Method block_tile_forward

diffsynth/models/sd_unet.py:175–180  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

173 tile_size = min(tile_size, min(height, width))
174 hidden_states = hidden_states.permute(0, 2, 1).reshape(batch, inner_dim, height, width)
175 def block_tile_forward(x):
176 b, c, h, w = x.shape
177 x = x.permute(0, 2, 3, 1).reshape(b, h*w, c)
178 x = block(x, encoder_hidden_states)
179 x = x.reshape(b, h, w, c).permute(0, 3, 1, 2)
180 return x
181 for block in self.transformer_blocks:
182 hidden_states = TileWorker().tiled_forward(
183 block_tile_forward,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected