demo: allow overriding the model repo via LFM_HF_REPO env var - #32
Open
abePclWaseda wants to merge 1 commit into
Open
demo: allow overriding the model repo via LFM_HF_REPO env var#32abePclWaseda wants to merge 1 commit into
abePclWaseda wants to merge 1 commit into
Conversation
The Gradio demo hardcodes LiquidAI/LFM2.5-Audio-1.5B, so there is no way to try other checkpoints such as LFM2.5-Audio-1.5B-JP without editing the installed package. Read the repo id from the LFM_HF_REPO environment variable, keeping the current default. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The Gradio demo hardcodes
HF_DIR = "LiquidAI/LFM2.5-Audio-1.5B", so there is currently no way to runliquid-audio-demowith another checkpoint — most notably the recently released Japanese model LiquidAI/LFM2.5-Audio-1.5B-JP — without editing the installed package.Changes
demo/model.py: read the repo id from theLFM_HF_REPOenvironment variable, keepingLiquidAI/LFM2.5-Audio-1.5Bas the default (no behavior change for existing users):README.md: document the variable in the Gradio demo section.Testing
LFM_HF_REPO=LiquidAI/LFM2.5-Audio-1.5B-JPon an A100 (torch 2.5.1, transformers 4.55.4) and had a Japanese speech-to-speech conversation; without the variable the demo loads the default English checkpoint as before.ruff check/ruff format --checkpass.