Skip to content

When loading HeartCodec-oss-20260123 with sharded weights, the model fails with: #100

@chaosnature

Description

@chaosnature

When loading HeartCodec-oss-20260123 with sharded weights, the model fails with:
"RuntimeError: You set ignore_mismatched_sizes to False"

Fix: Add ignore_mismatched_sizes=True to line 221 in music_generation.py:

heartcodec = HeartCodec.from_pretrained(
heartcodec_path,
device_map=device,
ignore_mismatched_sizes=True # Add this
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions