(x)
| 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, |
nothing calls this directly
no outgoing calls
no test coverage detected