liquid-audio icon indicating copy to clipboard operation
liquid-audio copied to clipboard

Support optional SHA-256 manifest verification for model files

Open spencer-ritual opened this issue 1 month ago • 0 comments

LFM2AudioModel.from_pretrained and LFM2AudioProcessor.from_pretrained accept revision= and resolve files through Hugging Face Hub, which pins the repository revision. They do not currently verify the resolved model files against a caller-approved set of content hashes.

For deployments that need assurance that the bytes loaded match an independently approved model artifact, could the library support an optional checksum manifest (or expected relative-path → SHA-256 mapping) and verify it after download/resolution but before loading weights or processor assets? Missing files and hash mismatches should fail closed. This could reuse the existing Hugging Face downloader and support both downloaded snapshots and local snapshot paths; no new downloader or cache scheme is needed.

Revision pinning remains useful, but it does not by itself express the caller's approved per-file hashes. An app can implement this verification externally today; upstream support would make the capability reusable for library users.

spencer-ritual avatar Nov 03 '26 20:11 spencer-ritual