(in_dir: str)
| 117 | |
| 118 | |
| 119 | def load_safetensors_from_dir(in_dir: str): |
| 120 | tensors = {} |
| 121 | safetensors = os.listdir(in_dir) |
| 122 | safetensors = [f for f in safetensors if f.endswith('.safetensors')] |
| 123 | for f in safetensors: |
| 124 | tensors.update(load_safetensors_from_path(os.path.join(in_dir, f))) |
| 125 | return tensors |
| 126 | |
| 127 | |
| 128 | def guess_cogvideo_config_from_state_dict(state_dict: dict): |
no test coverage detected