(weight, dim)
| 23 | |
| 24 | # similar to SD3 but only for the last norm layer |
| 25 | def swap_scale_shift(weight, dim): |
| 26 | shift, scale = weight.chunk(2, dim=0) |
| 27 | new_weight = torch.cat([scale, shift], dim=0) |
| 28 | return new_weight |
| 29 | |
| 30 | |
| 31 | def convert_transformer(state_dict): |
no outgoing calls
no test coverage detected
searching dependent graphs…