(model)
| 166 | return self.to_out(out) |
| 167 | |
| 168 | def change_forward(model): |
| 169 | for layer in model.children(): |
| 170 | if type(layer) == CrossAttention: |
| 171 | bound_method = new_forward.__get__(layer, layer.__class__) |
| 172 | setattr(layer, 'forward', bound_method) |
| 173 | else: |
| 174 | change_forward(layer) |
| 175 | |
| 176 | change_forward(self.model.diffusion_model) |
| 177 |
nothing calls this directly
no outgoing calls
no test coverage detected