(w)
| 171 | |
| 172 | |
| 173 | def reshape_weight_for_sd(w): |
| 174 | # convert HF linear weights to SD conv2d weights |
| 175 | if not w.ndim == 1: |
| 176 | return w.reshape(*w.shape, 1, 1) |
| 177 | else: |
| 178 | return w |
| 179 | |
| 180 | |
| 181 | def convert_vae_state_dict(vae_state_dict): |
no outgoing calls
no test coverage detected