Download diffsynth/utils/state_dict_converters/wan_video_vae.py from ViTeX-Bench/ViTeX-Edit-14B: direct link, hf CLI and curl.
- Browser
- Download file 257 Bytes
-
https://huggingface.co/ViTeX-Bench/ViTeX-Edit-14B/resolve/c5afbf279998b75da844c19fb4182e8bf58df875/diffsynth/utils/state_dict_converters/wan_video_vae.py
- Command line
-
hf download hf://ViTeX-Bench/ViTeX-Edit-14B@c5afbf279998b75da844c19fb4182e8bf58df875/diffsynth/utils/state_dict_converters/wan_video_vae.py
-
curl -L -o wan_video_vae.py https://huggingface.co/ViTeX-Bench/ViTeX-Edit-14B/resolve/c5afbf279998b75da844c19fb4182e8bf58df875/diffsynth/utils/state_dict_converters/wan_video_vae.py
257 Bytes
| def WanVideoVAEStateDictConverter(state_dict): | |
| state_dict_ = {} | |
| if 'model_state' in state_dict: | |
| state_dict = state_dict['model_state'] | |
| for name in state_dict: | |
| state_dict_['model.' + name] = state_dict[name] | |
| return state_dict_ |