Skip to content

Conversation

@cocktailpeanut
Copy link
Collaborator

The new custom model feature is very powerful but undermined by the fact that you have to type the HF urls every time.

This PR simply caches the field values to the browser localStorage when they change, so when you click "custom", the last used values are already filled out.

@SWivid
Copy link
Owner

SWivid commented Nov 11, 2024

@cocktailpeanut , thanks for pr~
Have a modified commit for caching 59761ec, cuz using js might have future problem if switch to other gradio component / switch to gradio 5.
See if last commit works.

@cocktailpeanut
Copy link
Collaborator Author

cocktailpeanut commented Nov 11, 2024

@cocktailpeanut , thanks for pr~ Have a modified commit for caching 59761ec, cuz using js might have future problem if switch to other gradio component / switch to gradio 5. See if last commit works.

I tested this and i think it's kind of broken. Right now what happens is when you use a custom model, it does get saved to the txt file, but then when you reload and click "custom" again, it triggers this: 59761ec#diff-c0b08fdea1b5d0d960bc35f91b2b1e45be003a21fb87c7ad4e5f7016bf9cf078R795-R800 which triggers switch_tts_model, at which point the new_choice is Custom, and the custom_ckpt_path and custom_vocab_path are the default SWivid URLs, so just by clicking custom, it resets the custom model we just reset here 59761ec#diff-c0b08fdea1b5d0d960bc35f91b2b1e45be003a21fb87c7ad4e5f7016bf9cf078R764-R766 so there is no effect.

Maybe I am missing something. If you let me know I can test again.

@SWivid
Copy link
Owner

SWivid commented Nov 11, 2024

will test, yes it broke.

update: it's for initialization problem, if simply refresh the webpage, init value will not reload from cache but retain the previous one while starting the gradio service; if restart the service, it's all right then.
fixing...

@SWivid
Copy link
Owner

SWivid commented Nov 11, 2024

fixed in be53fb1

@cocktailpeanut
Copy link
Collaborator Author

@SWivid just tried, it works! 🫡

@SWivid SWivid closed this Nov 11, 2024
spygaurad pushed a commit to spygaurad/F5-TTS that referenced this pull request Feb 28, 2025
deybith pushed a commit to deybith/F5-TTS that referenced this pull request Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants