(state_dict: Dict[str, Any], old_key: str, new_key: str)
| 154 | |
| 155 | # Function to update the state_dict with new key assignments in-place |
| 156 | def update_state_dict_inplace(state_dict: Dict[str, Any], old_key: str, new_key: str) -> Dict[str, Any]: |
| 157 | state_dict[new_key] = state_dict.pop(old_key) |
| 158 | |
| 159 | |
| 160 | # Function to convert a transformer checkpoint to the CogVideoX format |
no outgoing calls
no test coverage detected