Comfy-Org / Comfy-Org/ComfyUI

[Bug] Generating an ACE-Step 1.5 AIO checkpoint fails with: KeyError: 'lm_metadata'

Open
#12,669 0 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

The `Save Checkpoint` node should generate an AIO (all-in-one) `.safetensors` file with all the ACE-Step 1.5 models I provided.

### Actual Behavior

The `Save Checkpoint` node fails with the following error: `KeyError: 'lm_metadata'`

### Steps to Reproduce

- Download all the [split files for ACE-Step 1.5 Turbo](https://huggingface.co/Comfy-Org/ace_step_1.5_ComfyUI_files/tree/main/split_files) (the issue persists with the SFT model too).
- Import the following workflow (this was based on [Comfy's Turbo AIO model](https://huggingface.co/Comfy-Org/ace_step_1.5_ComfyUI_files/blob/main/checkpoints/ace_step_1.5_turbo_aio.safetensors)):
```
{"id":"88ac5dad-efd7-40bb-84fe-fbaefdee1fa9","revision":0,"last_node_id":96,"last_link_id":237,"nodes":[{"id":78,"type":"ModelSamplingAuraFlow","pos":[460,480],"size":[270,58],"flags":{},"order":3,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":174}],"outputs":[{"name":"MODEL","type":"MODEL","links":[236]}],"properties":{"cnr_id":"comfy-core","ver":"0.15.0","Node name for S&R":"ModelSamplingAuraFlow"},"widgets_values":[1]},{"id":69,"type":"VAELoader","pos":[80,860],"size":[270,58],"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"VAE","type":"VAE","links":[237]}],"properties":{"cnr_id":"comfy-core","ver":"0.15.0","Node name for S&R":"VAELoader"},"widgets_values":["ace_1.5_vae.safetensors"]},{"id":80,"type":"DualCLIPLoader","pos":[-180,640],"size":[532.70464044488,140.79608111417315],"flags":{},"order":1,"mode":0,"inputs":[],"outputs":[{"name":"CLIP","type":"CLIP","links":[234]}],"properties":{"cnr_id":"comfy-core","ver":"0.15.0","Node name for S&R":"DualCLIPLoader"},"widgets_values":["qwen_0.6b_ace15.safetensors","qwen_1.7b_ace15.safetensors","ace","default"]},{"id":68,"type":"UNETLoader","pos":[-20,480],"size":[374.41897679754186,82],"flags":{},"order":2,"mode":0,"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[174]}],"properties":{"cnr_id":"comfy-core","ver":"0.15.0","Node name for S&R":"UNETLoader"},"widgets_values":["acestep_v1.5_sft.safetensors","default"]},{"id":96,"type":"CheckpointSave","pos":[860,820],"size":[270,98],"flags":{},"order":4,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":236},{"name":"clip","type":"CLIP","link":234},{"name":"vae","type":"VAE","link":237}],"outputs":[],"properties":{"cnr_id":"comfy-core","ver":"0.15.0","Node name for S&R":"CheckpointSave"},"widgets_values":["checkpoints/acestep_1.5"]}],"links":[[174,68,0,78,0,"MODEL"],[234,80,0,96,1,"CLIP"],[236,78,0,96,0,"MODEL"],[237,69,0,96,2,"VAE"]],"groups":[],"config":{},"extra":{"frontendVersion":"1.41.5","workflowRendererVersion":"LG","ds":{"scale":0.6481621089303967,"offset":[732.9512428627305,77.526590620635]},"VHS_latentpreview":false,"VHS_latentpreviewrate":0,"VHS_MetadataImage":true,"VHS_KeepIntermediate":true},"version":0.4}
```
- Run the workflow.

### Debug Logs

```powershell
got prompt
[MultiGPU Core Patching] text_encoder_device_patched returning device: cuda:0 (current_text_encoder_device=cuda:0)
Requested to load ACE15TEModel_
loaded completely; 4673.04 MB loaded, full load: True
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cuda:0, dtype: torch.float16
!!! Exception during processing !!! 'lm_metadata'
Traceback (most recent call last):
File "C:\SD\ComfyUI_windows_portable\ComfyUI\execution.py", line 524, 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 "C:\SD\ComfyUI_windows_portable\ComfyUI\execution.py", line 333, 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 "C:\SD\ComfyUI_windows_portable\ComfyUI\execution.py", line 307, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "C:\SD\ComfyUI_windows_portable\ComfyUI\execution.py", line 295, in process_inputs
result = f(**inputs)
^^^^^^^^^^^
File "C:\SD\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_model_merging.py", line 248, in save
save_checkpoint(model, clip=clip, vae=vae, filename_prefix=filename_prefix, output_dir=self.output_dir, prompt=prompt, extra_pnginfo=extra_pnginfo)
File "C:\SD\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_model_merging.py", line 227, in save_checkpoint
comfy.sd.save_checkpoint(output_checkpoint, model, clip, vae, clip_vision, metadata=metadata, extra_keys=extra_keys)
File "C:\SD\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 1753, in save_checkpoint
load_models.append(clip.load_model())
^^^^^^^^^^^^^^^^^
File "C:\SD\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 419, in load_model
memory_used = self.cond_stage_model.memory_estimation_function(tokens, device=self.patcher.load_device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\SD\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\ace15.py", line 331, in memory_estimation_function
lm_metadata = token_weight_pairs["lm_metadata"]
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'lm_metadata'

Prompt executed in 7.66 seconds
```

### Other

```
ComfyUI: 0.15.1
ComfyUI_frontend: v1.41.7
OS: win32
Python Version: 3.11.6 (tags/v3.11.6:8b6ee5b, Oct 2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)]
Embedded Python: true
Pytorch Version: 2.9.0+cu128
Arguments: ComfyUI\main.py --windows-standalone-build --disable-all-custom-nodes
RAM Total: 31.36 GB
Device Name: cuda:0 NVIDIA GeForce RTX 3080 Laptop GPU : cudaMallocAsync
VRAM Total: 8 GB
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.