KeyError: 'proj_model.proj.weight' al cargar FantasyTalkingModelLoader

Open
#2,001 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
54/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Start with fantasytalking/nodes.py, especially loadmodel at line 116, where the loader accesses sd[name] and raises the reported KeyError. Check how the checkpoint's keys are read and compared with the projection model's expected keys. Reproduce with fantasytalking_fp16.safetensors; done when the loader handles the reported checkpoint and the standard workflow proceeds without this error.

Written by the indexing model from the issue text.

Description

Descripción del problema

Al ejecutar un workflow de WanVideo + FantasyTalking, el nodo FantasyTalkingModelLoader falla con el error KeyError: 'proj_model.proj.weight'. El error ocurre al cargar el archivo fantasytalking_fp16.safetensors.

Pasos para reproducir
  1. Cargar el workflow estándar de WanVideo I2V + FantasyTalking.
  2. Conectar FantasyTalkingModelLoader con el archivo fantasytalking_fp16.safetensors.
  3. Ejecutar el prompt.
Comportamiento esperado

El modelo debería cargarse correctamente y el workflow debería generar el video.

Comportamiento actual

Se produce el siguiente error:

KeyError: 'proj_model.proj.weight'

Configuración
  • Sistema: Windows 10/11
  • GPU: NVIDIA RTX 5080 (16GB VRAM)
  • ComfyUI version: 0.19.3
  • ComfyUI-WanVideoWrapper version: 1.4.7 (instalado desde Manager)
  • Modelo usado: fantasytalking_fp16.safetensors (descargado desde Hugging Face)
Intentos de solución realizados (sin éxito)
  • Reinstalación limpia del nodo ComfyUI-WanVideoWrapper.
  • Descarga y reemplazo del archivo .safetensors desde diferentes fuentes (Kijai, ALGOTECH).
  • Instalación manual desde GitHub con pip install -r requirements.txt.
  • Verificación de dependencias (diffusers, accelerate, peft).
Log de error completo
KeyError: 'proj_model.proj.weight'

  File "D:\Data\Packages\ComfyUI\execution.py", line 534, in execute
    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Data\Packages\ComfyUI\execution.py", line 334, in get_output_data
    return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Data\Packages\ComfyUI\execution.py", line 308, in _async_map_node_over_list
    await process_inputs(input_dict, i)
  File "D:\Data\Packages\ComfyUI\execution.py", line 296, in process_inputs
    result = f(**inputs)
             ^^^^^^^^^^^
  File "D:\Data\Packages\ComfyUI\custom_nodes\ComfyUI-WanVideoWrapper\fantasytalking\nodes.py", line 116, in loadmodel
    set_module_tensor_to_device(fantasytalking_proj_model, name, device=offload_device, dtype=base_dtype, value=sd[name])
                                                                                                                ~~^^^^^^
Dominant language
Python
Stars
6.8k
Forks
712
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from kijai/ComfyUI-WanVideoWrapper

All issues in kijai/ComfyUI-WanVideoWrapper

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.