Matrix-Game icon indicating copy to clipboard operation
Matrix-Game copied to clipboard

Commandline paths to models

Open SoftologyPro opened this issue 1 year ago • 11 comments

I downloaded the 2 models

https://huggingface.co/Skywork/Matrix-Game-2.0/resolve/main/Wan2.1_VAE.pth
https://huggingface.co/Skywork/Matrix-Game-2.0/resolve/main/models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth

into the

Matrix-Game\Matrix-Game-2

folder and then run this command

python inference_streaming.py --config_path configs/inference_yaml/inference_gta_drive.yaml --checkpoint_path models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth --output_folder outputs --seed 42 --pretrained_model_path .

and get this error

WARNING:torchao.kernel.intmm:Warning: Detected no triton, on systems without Triton certain kernels will not work
W0813 17:54:05.840000 7180 venv\Lib\site-packages\torch\distributed\elastic\multiprocessing\redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
configs/distilled_model/gta_drive
D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\diffusers\configuration_utils.py:248: FutureWarning: It is deprecated to pass a pretrained model name or path to `from_config`.If you were trying to load a model, please use <class 'wan.modules.causal_model.CausalWanModel'>.load_config(...) followed by <class 'wan.modules.causal_model.CausalWanModel'>.from_config(...) instead. Otherwise, please make sure to pass a configuration dictionary instead. This functionality will be removed in v1.0.0.
  deprecate("config-passed-as-path", "1.0.0", deprecation_message, standard_warn=False)
The config attributes {'inject_sample_info': False} were passed to CausalWanModel, but are not expected and will be ignored. Please verify your config.json configuration file.
KV inference with 3 frames per block
Loading Pretrained Model...
Traceback (most recent call last):
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 161, in <module>
    main()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 154, in main
    pipeline = InteractiveGameInference(args)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 39, in __init__
    self._init_models()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 68, in _init_models
    state_dict = load_file(self.args.checkpoint_path)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\safetensors\torch.py", line 381, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
safetensors_rust.SafetensorError: Error while deserializing header: header too large

Am I using the right models in the right location with the right command line?

SoftologyPro avatar Aug 13 '25 07:08 SoftologyPro

To set the checkpoint_path, you can choose from the following pre-trained models: our templerun model universal model our gta model

I downloaded the 2 models

https://huggingface.co/Skywork/Matrix-Game-2.0/resolve/main/Wan2.1_VAE.pth
https://huggingface.co/Skywork/Matrix-Game-2.0/resolve/main/models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth

into the

Matrix-Game\Matrix-Game-2

folder and then run this command

python inference_streaming.py --config_path configs/inference_yaml/inference_gta_drive.yaml --checkpoint_path models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth --output_folder outputs --seed 42 --pretrained_model_path .

and get this error

WARNING:torchao.kernel.intmm:Warning: Detected no triton, on systems without Triton certain kernels will not work
W0813 17:54:05.840000 7180 venv\Lib\site-packages\torch\distributed\elastic\multiprocessing\redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
configs/distilled_model/gta_drive
D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\diffusers\configuration_utils.py:248: FutureWarning: It is deprecated to pass a pretrained model name or path to `from_config`.If you were trying to load a model, please use <class 'wan.modules.causal_model.CausalWanModel'>.load_config(...) followed by <class 'wan.modules.causal_model.CausalWanModel'>.from_config(...) instead. Otherwise, please make sure to pass a configuration dictionary instead. This functionality will be removed in v1.0.0.
  deprecate("config-passed-as-path", "1.0.0", deprecation_message, standard_warn=False)
The config attributes {'inject_sample_info': False} were passed to CausalWanModel, but are not expected and will be ignored. Please verify your config.json configuration file.
KV inference with 3 frames per block
Loading Pretrained Model...
Traceback (most recent call last):
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 161, in <module>
    main()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 154, in main
    pipeline = InteractiveGameInference(args)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 39, in __init__
    self._init_models()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 68, in _init_models
    state_dict = load_file(self.args.checkpoint_path)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\safetensors\torch.py", line 381, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
safetensors_rust.SafetensorError: Error while deserializing header: header too large

Am I using the right models in the right location with the right command line?

ori-gins avatar Aug 13 '25 08:08 ori-gins

Can you provide the working commandline for the gta model and example?

I downloaded the gta_keyboard2dim.safetensors model and modified the commandline to

python inference_streaming.py --config_path configs/inference_yaml/inference_gta_drive.yaml --checkpoint_path gta_keyboard2dim.safetensors --output_folder outputs --seed 42 --pretrained_model_path .

but now I get this error...

W0813 18:57:36.440000 20568 venv\Lib\site-packages\torch\distributed\elastic\multiprocessing\redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
configs/distilled_model/gta_drive
D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\diffusers\configuration_utils.py:248: FutureWarning: It is deprecated to pass a pretrained model name or path to `from_config`.If you were trying to load a model, please use <class 'wan.modules.causal_model.CausalWanModel'>.load_config(...) followed by <class 'wan.modules.causal_model.CausalWanModel'>.from_config(...) instead. Otherwise, please make sure to pass a configuration dictionary instead. This functionality will be removed in v1.0.0.
  deprecate("config-passed-as-path", "1.0.0", deprecation_message, standard_warn=False)
The config attributes {'inject_sample_info': False} were passed to CausalWanModel, but are not expected and will be ignored. Please verify your config.json configuration file.
KV inference with 3 frames per block
Loading Pretrained Model...
Traceback (most recent call last):
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\transformers\utils\hub.py", line 479, in cached_files
    hf_hub_download(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 106, in _inner_fn
    validate_repo_id(arg_value)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\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: '.\xlm-roberta-large'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 161, in <module>
    main()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 154, in main
    pipeline = InteractiveGameInference(args)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 39, in __init__
    self._init_models()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 74, in _init_models
    vae = get_wanx_vae_wrapper(self.args.pretrained_model_path, torch.float16)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\wan\vae\wanx_vae.py", line 43, in get_wanx_vae_wrapper
    clip = CLIPModel(checkpoint_path = os.path.join(model_path, "models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth"),
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\wan\vae\wanx_vae_src\clip.py", line 526, in __init__
    self.tokenizer = HuggingfaceTokenizer(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\wan\vae\wanx_vae_src\tokenizers.py", line 46, in __init__
    self.tokenizer = AutoTokenizer.from_pretrained(name, **kwargs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 1049, in from_pretrained
    tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 881, in get_tokenizer_config
    resolved_config_file = cached_file(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\transformers\utils\hub.py", line 321, in cached_file
    file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\transformers\utils\hub.py", line 531, in cached_files
    resolved_files = [
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\transformers\utils\hub.py", line 532, in <listcomp>
    _get_cache_file_to_return(path_or_repo_id, filename, cache_dir, revision, repo_type)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\transformers\utils\hub.py", line 144, in _get_cache_file_to_return
    resolved_file = try_to_load_from_cache(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 106, in _inner_fn
    validate_repo_id(arg_value)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\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: '.\xlm-roberta-large'.

SoftologyPro avatar Aug 13 '25 08:08 SoftologyPro

  1. download our Hugging Face model hf download Skywork/Matrix-Game-2.0
  2. Set the pretrained_model_path to the directory of our Hugging Face model.

ori-gins avatar Aug 13 '25 09:08 ori-gins

OK, what should the --checkpoint_path argument be set to?

SoftologyPro avatar Aug 13 '25 10:08 SoftologyPro

I find this command works: python inference_streaming.py --config_path configs/inference_yaml/inference_gta_drive.yaml --checkpoint_path ./ckpt/Matrix-Game-2.0/gta_distilled_model/gta_keyboard2dim.safetensors --output_folder ./outputs --seed 42 --pretrained_model_path ./ckpt/Matrix-Game-2.0

chenyzh28 avatar Aug 13 '25 10:08 chenyzh28

OK, getting closer. For everyone else, download the models with (run this under the Matrix-Game\Matrix-Game-2 folder)

pip install huggingface-hub
pip install hf_xet
hf download Skywork/Matrix-Game-2.0 --local-dir ./models

Then to start

python inference_streaming.py --config_path configs/inference_yaml/inference_gta_drive.yaml --checkpoint_path .\models\gta_distilled_model\gta_keyboard2dim.safetensors --output_folder outputs --seed 42 --pretrained_model_path .\models

But now I get prompted to

Please input the image path: demo_images\gta_drive
Fail to load image from demo_images\gta_drive!
Please input the image path: .\demo_images\gta_drive
Fail to load image from .\demo_images\gta_drive!
Please input the image path:

What should the image path be? Is there a way to pass that to the command line?

SoftologyPro avatar Aug 13 '25 10:08 SoftologyPro

OK, got it. You need to specify or pass a single image in, not a directory of images.

python inference.py --config_path configs/inference_yaml/inference_gta_drive.yaml --checkpoint_path ./models/gta_distilled_model/gta_keyboard2dim.safetensors --img_path ./demo_images/gta_drive/0000.png --output_folder outputs --num_output_frames 150 --seed 42 --pretrained_model_path ./models

That gets past the image error, but then I get all this

W0814 08:35:57.693000 27468 venv\Lib\site-packages\torch\distributed\elastic\multiprocessing\redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
configs/distilled_model/gta_drive
D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\diffusers\configuration_utils.py:248: FutureWarning: It is deprecated to pass a pretrained model name or path to `from_config`.If you were trying to load a model, please use <class 'wan.modules.causal_model.CausalWanModel'>.load_config(...) followed by <class 'wan.modules.causal_model.CausalWanModel'>.from_config(...) instead. Otherwise, please make sure to pass a configuration dictionary instead. This functionality will be removed in v1.0.0.
  deprecate("config-passed-as-path", "1.0.0", deprecation_message, standard_warn=False)
The config attributes {'inject_sample_info': False} were passed to CausalWanModel, but are not expected and will be ignored. Please verify your config.json configuration file.
KV inference with 3 frames per block
Loading Pretrained Model...
D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torchvision\transforms\v2\_deprecated.py:42: UserWarning: The transform `ToTensor()` is deprecated and will be removed in a future release. Instead, please use `v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])`.Output is equivalent up to float precision.
  warnings.warn(
  0%|                                                                                                                                                                                                                                                   | 0/50 [00:00<?, ?it/s]E0814 08:37:31.316000 27468 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\md\cmdkrffpc3po2byydefigblrgalkkkseurzicrkcd4jmythw4l3e.py, ALLOW_TF32=True, BLOCK_K=16, BLOCK_M=256, BLOCK_N=64, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=4)
E0814 08:37:31.316000 27468 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\n4\cn43d5jdmylcfbgtkgb2usgh6qw2p3rxbdg4pfc4gka7kirq2ksh.py, ALLOW_TF32=True, BLOCK_K=16, BLOCK_M=64, BLOCK_N=128, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=4)
E0814 08:37:31.317000 27468 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\52\c52t6ki7jy75qqyydibd2ptegdwdwzb6ir7btuqenmreb7qdtg4g.py, ALLOW_TF32=True, BLOCK_K=32, BLOCK_M=64, BLOCK_N=128, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=8)
E0814 08:37:31.317000 27468 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\iz\cizk6cutm33ivui2lecpfa5n426xvspv3noatjmueprrdztlqfq4.py, ALLOW_TF32=True, BLOCK_K=32, BLOCK_M=64, BLOCK_N=64, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=4)
E0814 08:37:31.317000 27468 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\hp\chpntv3hhf5mfdmowlxkhvgiqajinjb4bzryupkni47wpd2a2ryp.py, ALLOW_TF32=True, BLOCK_K=32, BLOCK_M=256, BLOCK_N=64, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=8)
E0814 08:37:31.317000 27468 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\pp\cpprsgyvmcnfslcje5v2xmbjbcdfo45jofcy3zdpa5vzyr6e4fqt.py, ALLOW_TF32=True, BLOCK_K=16, BLOCK_M=1024, BLOCK_N=16, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=1, num_warps=8)
E0814 08:37:31.317000 27468 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\jz\cjzgchrjhpfex55w6wfus3c7kxvcujbysypetgcw2gpa657ofalr.py, ALLOW_TF32=True, BLOCK_K=32, BLOCK_M=128, BLOCK_N=128, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=8)
  0%|                                                                                                                                                                                                                                                   | 0/50 [01:04<?, ?it/s]
Traceback (most recent call last):
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference.py", line 169, in <module>
    main()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference.py", line 166, in main
    pipeline.generate_videos()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference.py", line 134, in generate_videos
    videos = self.pipeline.inference(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\pipeline\causal_inference.py", line 353, in inference
    video, vae_cache = self.vae_decoder(denoised_pred.half(), *vae_cache)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\nn\modules\module.py", line 1749, in _wrapped_call_impl
    return self._compiled_call_impl(*args, **kwargs)  # type: ignore[misc]
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\eval_frame.py", line 663, in _fn
    raise e.remove_dynamo_frames() from None  # see TORCHDYNAMO_VERBOSE=1
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\output_graph.py", line 1544, in _call_user_compiler
    raise BackendCompilerFailed(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\output_graph.py", line 1519, in _call_user_compiler
    compiled_fn = compiler_fn(gm, self.example_inputs())
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\repro\after_dynamo.py", line 150, in __call__
    compiled_gm = compiler_fn(gm, example_inputs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\__init__.py", line 2347, in __call__
    return compile_fx(model_, inputs_, config_patches=self.config)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 1731, in compile_fx
    return compile_fx(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 2089, in compile_fx
    return aot_autograd(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\backends\common.py", line 101, in __call__
    cg = aot_module_simplified(gm, example_inputs, **self.kwargs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\aot_autograd.py", line 1160, in aot_module_simplified
    compiled_fn = AOTAutogradCache.load(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\_aot_autograd\autograd_cache.py", line 775, in load
    compiled_fn = dispatch_and_compile()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\aot_autograd.py", line 1145, in dispatch_and_compile
    compiled_fn, _ = create_aot_dispatcher_function(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\aot_autograd.py", line 570, in create_aot_dispatcher_function
    return _create_aot_dispatcher_function(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\aot_autograd.py", line 820, in _create_aot_dispatcher_function
    compiled_fn, fw_metadata = compiler_fn(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\_aot_autograd\jit_compile_runtime_wrappers.py", line 219, in aot_dispatch_base
    compiled_fw = compiler(fw_module, updated_flat_args)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\aot_autograd.py", line 479, in __call__
    return self.compiler_fn(gm, example_inputs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 1944, in fw_compiler_base
    return inner_compile(
  File "D:\Python\lib\contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 628, in compile_fx_inner
    return wrap_compiler_debug(_compile_fx_inner, compiler_name="inductor")(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\repro\after_aot.py", line 124, in debug_wrapper
    inner_compiled_fn = compiler_fn(gm, example_inputs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 735, in _compile_fx_inner
    mb_compiled_graph = fx_codegen_and_compile(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 1295, in fx_codegen_and_compile
    return scheme.codegen_and_compile(gm, example_inputs, inputs_to_check, graph_kwargs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 1197, in codegen_and_compile
    compiled_fn = graph.compile_to_module().call
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\graph.py", line 2083, in compile_to_module
    return self._compile_to_module()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\graph.py", line 2091, in _compile_to_module
    self.codegen_with_cpp_wrapper() if self.cpp_wrapper else self.codegen()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\graph.py", line 1998, in codegen
    self._update_scheduler()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\graph.py", line 1992, in _update_scheduler
    self.scheduler = Scheduler(self.operations)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\scheduler.py", line 1985, in __init__
    self._init(nodes)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\scheduler.py", line 2063, in _init
    self.nodes = self.fuse_nodes(self.nodes)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\scheduler.py", line 2567, in fuse_nodes
    nodes = self.fuse_nodes_once(nodes)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\scheduler.py", line 3059, in fuse_nodes_once
    speedup = self.speedup_by_fusion(node1, node2)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\scheduler.py", line 2820, in speedup_by_fusion
    choice_timings = multi_node.choice_timings
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\ir.py", line 4556, in choice_timings
    self._choice_timings = self._choice_timings_fn()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 1949, in get_timings
    timings = do_autotuning(precompile_fn)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 1913, in do_autotuning
    timings = self.lookup(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\codecache.py", line 321, in lookup
    timings = benchmark(choices)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 1893, in autotune
    return make_benchmark_fn()(choices)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 2117, in benchmark_in_current_process
    raise e
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 2083, in benchmark_in_current_process
    timing = benchmark_choice_in_current_process(choice, inputs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 2063, in benchmark_choice_in_current_process
    result = choice.benchmark(*inpts, out=output)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 1353, in benchmark
    return self.bmreq.benchmark(*args, output_tensor=out)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\autotune_process.py", line 554, in benchmark
    out = self.do_bench(fn, *input_tensors, output_tensor)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\autotune_process.py", line 615, in do_bench
    out = benchmarker.benchmark_gpu(fn)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\benchmarking.py", line 39, in wrapper
    return fn(self, *args, **kwargs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\benchmarking.py", line 243, in benchmark_gpu
    _callable()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\triton_heuristics.py", line 906, in run
    self.precompile()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\triton_heuristics.py", line 277, in precompile
    self._make_launchers()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\triton_heuristics.py", line 434, in _make_launchers
    launchers.append(result.make_launcher())
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\triton_heuristics.py", line 1153, in make_launcher
    "launch_enter_hook": binary.__class__.launch_enter_hook,
torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
AttributeError: type object 'CompiledKernel' has no attribute 'launch_enter_hook'

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"

same for inference_streaming.py

W0814 08:39:29.077000 32356 venv\Lib\site-packages\torch\distributed\elastic\multiprocessing\redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
configs/distilled_model/gta_drive
D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\diffusers\configuration_utils.py:248: FutureWarning: It is deprecated to pass a pretrained model name or path to `from_config`.If you were trying to load a model, please use <class 'wan.modules.causal_model.CausalWanModel'>.load_config(...) followed by <class 'wan.modules.causal_model.CausalWanModel'>.from_config(...) instead. Otherwise, please make sure to pass a configuration dictionary instead. This functionality will be removed in v1.0.0.
  deprecate("config-passed-as-path", "1.0.0", deprecation_message, standard_warn=False)
The config attributes {'inject_sample_info': False} were passed to CausalWanModel, but are not expected and will be ignored. Please verify your config.json configuration file.
KV inference with 3 frames per block
Loading Pretrained Model...
D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torchvision\transforms\v2\_deprecated.py:42: UserWarning: The transform `ToTensor()` is deprecated and will be removed in a future release. Instead, please use `v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])`.Output is equivalent up to float precision.
  warnings.warn(
Please input the image path: ./demo_images/gta_drive/0000.png

------------------------------
PRESS [W, S, A, D, Q] FOR MOVEMENT
 (W: forward, S: back, A: left, D: right, Q: no move)
------------------------------
Please input the actions (split with ` `):
(e.g. `W` for forward, `W A` for forward and left)
E0814 08:41:03.666000 32356 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\iz\cizk6cutm33ivui2lecpfa5n426xvspv3noatjmueprrdztlqfq4.py, ALLOW_TF32=True, BLOCK_K=32, BLOCK_M=64, BLOCK_N=64, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=4)
E0814 08:41:03.666000 32356 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\pp\cpprsgyvmcnfslcje5v2xmbjbcdfo45jofcy3zdpa5vzyr6e4fqt.py, ALLOW_TF32=True, BLOCK_K=16, BLOCK_M=1024, BLOCK_N=16, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=1, num_warps=8)
E0814 08:41:03.681000 32356 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\hp\chpntv3hhf5mfdmowlxkhvgiqajinjb4bzryupkni47wpd2a2ryp.py, ALLOW_TF32=True, BLOCK_K=32, BLOCK_M=256, BLOCK_N=64, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=8)
E0814 08:41:03.681000 32356 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\n4\cn43d5jdmylcfbgtkgb2usgh6qw2p3rxbdg4pfc4gka7kirq2ksh.py, ALLOW_TF32=True, BLOCK_K=16, BLOCK_M=64, BLOCK_N=128, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=4)
E0814 08:41:03.681000 32356 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\md\cmdkrffpc3po2byydefigblrgalkkkseurzicrkcd4jmythw4l3e.py, ALLOW_TF32=True, BLOCK_K=16, BLOCK_M=256, BLOCK_N=64, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=4)
E0814 08:41:03.682000 32356 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\jz\cjzgchrjhpfex55w6wfus3c7kxvcujbysypetgcw2gpa657ofalr.py, ALLOW_TF32=True, BLOCK_K=32, BLOCK_M=128, BLOCK_N=128, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=8)
E0814 08:41:03.682000 32356 venv\Lib\site-packages\torch\_inductor\select_algorithm.py:1869] [0/0] Exception type object 'CompiledKernel' has no attribute 'launch_enter_hook' for benchmark choice TritonTemplateCaller(C:\Users\Jason\AppData\Local\Temp\torchinductor_Jason\52\c52t6ki7jy75qqyydibd2ptegdwdwzb6ir7btuqenmreb7qdtg4g.py, ALLOW_TF32=True, BLOCK_K=32, BLOCK_M=64, BLOCK_N=128, GROUPS=1, KERNEL_D=3, KERNEL_H=3, KERNEL_W=3, PADDING_D=0, PADDING_H=0, PADDING_W=0, STRIDE_D=1, STRIDE_H=1, STRIDE_W=1, UNROLL=False, num_stages=2, num_warps=8)
Traceback (most recent call last):
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 161, in <module>
    main()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 158, in main
    pipeline.generate_videos(mode)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\inference_streaming.py", line 140, in generate_videos
    videos = self.pipeline.inference(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\pipeline\causal_inference.py", line 648, in inference
    video, vae_cache = self.vae_decoder(denoised_pred.half(), *vae_cache)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\nn\modules\module.py", line 1749, in _wrapped_call_impl
    return self._compiled_call_impl(*args, **kwargs)  # type: ignore[misc]
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\eval_frame.py", line 663, in _fn
    raise e.remove_dynamo_frames() from None  # see TORCHDYNAMO_VERBOSE=1
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\output_graph.py", line 1544, in _call_user_compiler
    raise BackendCompilerFailed(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\output_graph.py", line 1519, in _call_user_compiler
    compiled_fn = compiler_fn(gm, self.example_inputs())
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\repro\after_dynamo.py", line 150, in __call__
    compiled_gm = compiler_fn(gm, example_inputs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\__init__.py", line 2347, in __call__
    return compile_fx(model_, inputs_, config_patches=self.config)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 1731, in compile_fx
    return compile_fx(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 2089, in compile_fx
    return aot_autograd(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\backends\common.py", line 101, in __call__
    cg = aot_module_simplified(gm, example_inputs, **self.kwargs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\aot_autograd.py", line 1160, in aot_module_simplified
    compiled_fn = AOTAutogradCache.load(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\_aot_autograd\autograd_cache.py", line 775, in load
    compiled_fn = dispatch_and_compile()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\aot_autograd.py", line 1145, in dispatch_and_compile
    compiled_fn, _ = create_aot_dispatcher_function(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\aot_autograd.py", line 570, in create_aot_dispatcher_function
    return _create_aot_dispatcher_function(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\aot_autograd.py", line 820, in _create_aot_dispatcher_function
    compiled_fn, fw_metadata = compiler_fn(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\_aot_autograd\jit_compile_runtime_wrappers.py", line 219, in aot_dispatch_base
    compiled_fw = compiler(fw_module, updated_flat_args)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_functorch\aot_autograd.py", line 479, in __call__
    return self.compiler_fn(gm, example_inputs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 1944, in fw_compiler_base
    return inner_compile(
  File "D:\Python\lib\contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 628, in compile_fx_inner
    return wrap_compiler_debug(_compile_fx_inner, compiler_name="inductor")(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_dynamo\repro\after_aot.py", line 124, in debug_wrapper
    inner_compiled_fn = compiler_fn(gm, example_inputs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 735, in _compile_fx_inner
    mb_compiled_graph = fx_codegen_and_compile(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 1295, in fx_codegen_and_compile
    return scheme.codegen_and_compile(gm, example_inputs, inputs_to_check, graph_kwargs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\compile_fx.py", line 1197, in codegen_and_compile
    compiled_fn = graph.compile_to_module().call
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\graph.py", line 2083, in compile_to_module
    return self._compile_to_module()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\graph.py", line 2091, in _compile_to_module
    self.codegen_with_cpp_wrapper() if self.cpp_wrapper else self.codegen()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\graph.py", line 1998, in codegen
    self._update_scheduler()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\graph.py", line 1992, in _update_scheduler
    self.scheduler = Scheduler(self.operations)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\scheduler.py", line 1985, in __init__
    self._init(nodes)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\scheduler.py", line 2063, in _init
    self.nodes = self.fuse_nodes(self.nodes)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\scheduler.py", line 2567, in fuse_nodes
    nodes = self.fuse_nodes_once(nodes)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\scheduler.py", line 3059, in fuse_nodes_once
    speedup = self.speedup_by_fusion(node1, node2)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\scheduler.py", line 2820, in speedup_by_fusion
    choice_timings = multi_node.choice_timings
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\ir.py", line 4556, in choice_timings
    self._choice_timings = self._choice_timings_fn()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 1949, in get_timings
    timings = do_autotuning(precompile_fn)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 1913, in do_autotuning
    timings = self.lookup(
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\codecache.py", line 321, in lookup
    timings = benchmark(choices)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 1893, in autotune
    return make_benchmark_fn()(choices)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 2117, in benchmark_in_current_process
    raise e
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 2083, in benchmark_in_current_process
    timing = benchmark_choice_in_current_process(choice, inputs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 2063, in benchmark_choice_in_current_process
    result = choice.benchmark(*inpts, out=output)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\select_algorithm.py", line 1353, in benchmark
    return self.bmreq.benchmark(*args, output_tensor=out)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\autotune_process.py", line 554, in benchmark
    out = self.do_bench(fn, *input_tensors, output_tensor)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\autotune_process.py", line 615, in do_bench
    out = benchmarker.benchmark_gpu(fn)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\benchmarking.py", line 39, in wrapper
    return fn(self, *args, **kwargs)
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\benchmarking.py", line 243, in benchmark_gpu
    _callable()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\triton_heuristics.py", line 906, in run
    self.precompile()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\triton_heuristics.py", line 277, in precompile
    self._make_launchers()
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\triton_heuristics.py", line 434, in _make_launchers
    launchers.append(result.make_launcher())
  File "D:\Tests\Matrix-Game-2.0\Matrix-Game\Matrix-Game-2\venv\lib\site-packages\torch\_inductor\runtime\triton_heuristics.py", line 1153, in make_launcher
    "launch_enter_hook": binary.__class__.launch_enter_hook,
torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
AttributeError: type object 'CompiledKernel' has no attribute 'launch_enter_hook'

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"

SoftologyPro avatar Aug 13 '25 22:08 SoftologyPro

Hello, I am unable to reproduce your issue in the Linux environment. This problem seems to be caused by torch.compile. You can try searching for and commenting out the torch.compile statement to see if it resolves the issue. torch.compile

ori-gins avatar Aug 14 '25 03:08 ori-gins

@SoftologyPro https://github.com/SkyworkAI/Matrix-Game/blob/81ae2700f4496193b689e2399d5ef6a23915f622/Matrix-Game-2/inference_streaming.py#L64 You can try to comment out this line of code, but it will be slightly slower.

liuuzexiang avatar Aug 14 '25 06:08 liuuzexiang

OK, that works. Thanks.

SoftologyPro avatar Aug 14 '25 08:08 SoftologyPro

Hi @liuuzexiang May I ask how to infer using the base_model before distillation? when I tried to load the weight, I got errors like RuntimeError: Error(s) in loading state_dict for WanDiffusionWrapper: Missing key(s) in state_dict: "model.patch_embedding.weight", "model.patch_embedding.bias", "model.time_embedding.0.weight",...... Thank you in advance!

LeeKeyu avatar Sep 16 '25 12:09 LeeKeyu