ai-toolkit icon indicating copy to clipboard operation
ai-toolkit copied to clipboard

Wan2.2-T2V-A14B: is not the path to a directory containing a config.json file.

Open jiangzw2013 opened this issue 4 months ago • 3 comments

I downloaded the Wan2.2 model from this link (https://modelscope.cn/models/Wan-AI/Wan2.2-T2V-A14B/files?version=bf16), and then specified a directory for training. However, the following error occurred:

#############################################

Running job: huangjin_wan_lora_v1

#############################################

Running 1 process Loading Wan model Loading transformer 1 Error running job: We couldn't connect to 'https://huggingface.co' to load this model, couldn't find it in the cached files and it looks like D:\ai_models\Wan2.2-T2V-A14B\transformer is not the path to a directory containing a config.json file. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/diffusers/installation#offline-mode'.

======================================== Result:

  • 0 completed jobs
  • 1 failure ======================================== Traceback (most recent call last): File "D:\ai-toolkit\venv\Lib\site-packages\diffusers\configuration_utils.py", line 392, in load_config config_file = hf_hub_download( ^^^^^^^^^^^^^^^^ File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 106, in inner_fn validate_repo_id(arg_value) File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 160, in validate_repo_id raise HFValidationError( huggingface_hub.errors.HFValidationError: Repo id must use alphanumeric chars or '-', '', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'D:\ai_models\Wan2.2-T2V-A14B\transformer'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\ai-toolkit\run.py", line 120, in main() File "D:\ai-toolkit\run.py", line 108, in main raise e File "D:\ai-toolkit\run.py", line 96, in main job.run() File "D:\ai-toolkit\jobs\ExtensionJob.py", line 22, in run process.run() File "D:\ai-toolkit\jobs\process\BaseSDTrainProcess.py", line 1560, in run self.sd.load_model() File "D:\ai-toolkit\extensions_built_in\diffusion_models\wan22\wan22_14b_model.py", line 227, in load_model super().load_model() File "D:\ai-toolkit\toolkit\models\wan21\wan21.py", line 401, in load_model transformer = self.load_wan_transformer( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ai-toolkit\extensions_built_in\diffusion_models\wan22\wan22_14b_model.py", line 283, in load_wan_transformer transformer_1 = WanTransformer3DModel.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "D:\ai-toolkit\venv\Lib\site-packages\diffusers\models\modeling_utils.py", line 1077, in from_pretrained config, unused_kwargs, commit_hash = cls.load_config( ^^^^^^^^^^^^^^^^ File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "D:\ai-toolkit\venv\Lib\site-packages\diffusers\configuration_utils.py", line 428, in load_config raise EnvironmentError( OSError: We couldn't connect to 'https://huggingface.co' to load this model, couldn't find it in the cached files and it looks like D:\ai_models\Wan2.2-T2V-A14B\transformer is not the path to a directory containing a config.json file. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/diffusers/installation#offline-mode'.

(venv) D:\ai-toolkit>

jiangzw2013 avatar Aug 28 '25 15:08 jiangzw2013

May I ask if you have solved this problem?

Hasasasa avatar Sep 13 '25 14:09 Hasasasa

There are two repos for each version of Wan on HF, make sure to download the one with Diffusers in its name.

CORRECT repo git clone https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers

INCORRECT repo git clone https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B

tdtrumble avatar Sep 26 '25 16:09 tdtrumble

There are two repos for each version of Wan on HF, make sure to download the one with Diffusers in its name.

CORRECT repo git clone https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers

INCORRECT repo git clone https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B

Based on the Qwen-Image model quantization of the model, there is no json file provided, is it possible to directly use the official json file provided, for example, comfyUI's library does not have this configuration file.

zuohaoda avatar Dec 02 '25 09:12 zuohaoda