Skip to content

Commit a9dad24

Browse files
authored
fix React Build (#514)
* return True/False after installing extension * put ace-step as the first music generation tab * rename React UI to TTS Webui not TTS generation WebUI * fix import
1 parent 284382b commit a9dad24

File tree

7 files changed

+29
-24
lines changed

7 files changed

+29
-24
lines changed

extensions.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,20 @@
105105
"extension_website": "https://github.com/rsxdalv/extension_bark",
106106
"extension_platform_version": "0.0.1"
107107
},
108+
{
109+
"package_name": "extension_ace_step",
110+
"name": "ACE-Step",
111+
"requirements": "git+https://github.com/rsxdalv/extension_ace_step@main",
112+
"description": "ACE-Step: A Step Towards Music Generation Foundation Model",
113+
"extension_type": "interface",
114+
"extension_class": "audio-music-generation",
115+
"author": "ACE-Step",
116+
"extension_author": "rsxdalv",
117+
"license": "MIT",
118+
"website": "https://github.com/ACE-Step/ACE-Step",
119+
"extension_website": "https://github.com/rsxdalv/extension_ace_step",
120+
"extension_platform_version": "0.0.1"
121+
},
108122
{
109123
"package_name": "extension_stable_audio",
110124
"recommended": true,
@@ -558,20 +572,6 @@
558572
"extension_website": "https://github.com/rsxdalv/extension_piper_tts",
559573
"extension_platform_version": "0.0.1"
560574
},
561-
{
562-
"package_name": "extension_ace_step",
563-
"name": "ACE-Step",
564-
"requirements": "git+https://github.com/rsxdalv/extension_ace_step@main",
565-
"description": "ACE-Step: A Step Towards Music Generation Foundation Model",
566-
"extension_type": "interface",
567-
"extension_class": "audio-music-generation",
568-
"author": "ACE-Step",
569-
"extension_author": "rsxdalv",
570-
"license": "MIT",
571-
"website": "https://github.com/ACE-Step/ACE-Step",
572-
"extension_website": "https://github.com/rsxdalv/extension_ace_step",
573-
"extension_platform_version": "0.0.1"
574-
},
575575
{
576576
"package_name": "extension_rvc_training",
577577
"name": "RVC Training (Not available yet)",

react-ui/src/components/Header.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ export const routes: Route[] = [
9191
href: "/audio-music-generation",
9292
text: "Audio/Music Generation",
9393
subroutes: [
94+
{
95+
href: "/audio-music-generation/ace-step",
96+
text: "ACE-Step",
97+
},
9498
{
9599
href: "/audio-music-generation/musicgen",
96100
text: "MusicGen",
@@ -103,10 +107,6 @@ export const routes: Route[] = [
103107
href: "/audio-music-generation/stable-audio",
104108
text: "Stable Audio",
105109
},
106-
{
107-
href: "/audio-music-generation/ace-step",
108-
text: "ACE-Step",
109-
},
110110
],
111111
},
112112
{
@@ -270,7 +270,7 @@ export const Header = ({}) => {
270270
<>
271271
<div className="flex items-center w-full pb-1">
272272
<h1 className="text-3xl font-bold text-start w-full text-gray-900">
273-
TTS Generation Webui
273+
TTS WebUI
274274
</h1>
275275
<div className="mr-2 relative w-96 flex-shrink-0 h-12 z-10">
276276
<div className="w-full">

react-ui/src/components/Template.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const Template = ({
2222
<Header />
2323
{title && (
2424
<Head>
25-
<title>{`${title} - TTS Generation Webui`}</title>
25+
<title>{`${title} - TTS WebUI`}</title>
2626
</Head>
2727
)}
2828
{children}

react-ui/src/components/ui/toaster.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client"
22

3-
import { useToast } from "@/components/hooks/use-toast"
3+
import { useToast } from "@/hooks/use-toast"
44
import {
55
Toast,
66
ToastClose,

react-ui/src/pages/extensions/huggingface_cache_manager.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const GPUInfoPage = () => {
77
return (
88
<Template>
99
<Head>
10-
<title>GPU Info - TTS Generation Webui</title>
10+
<title>GPU Info - TTS WebUI</title>
1111
</Head>
1212
<div className="gap-y-4 p-4 flex w-full flex-col items-center">
1313
<ExtensionHuggingFaceCacheManager />

react-ui/src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function Home() {
1414
return (
1515
<Template>
1616
<Head>
17-
<title>TTS Generation Webui</title>
17+
<title>TTS WebUI</title>
1818
</Head>
1919
<div className="flex flex-col gap-2 text-center max-w-2xl">
2020
<h2 className="text-2xl font-bold">Welcome to the TTS Webui!</h2>

tts_webui/utils/pip_install.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ def pip_install_wrapper(requirements, name, include_gradio=True):
1414
def fn():
1515
output = []
1616
for line in _pip_install(requirements + " gradio==5.5.0" if include_gradio else "", name):
17-
output.append(line)
17+
output.append(str(line))
1818
yield "<br />".join(output)
1919

2020
write_log(output, name, type="pip-install")
21+
return line
22+
# verify installation by importing the package or drying run install
2123

2224
return fn
2325

@@ -64,9 +66,12 @@ def _pip_install(requirements, name):
6466
# yield from pip_shell(f"uv pip install {requirements}")
6567
print(f"Successfully installed {name} dependencies")
6668
yield f"Successfully installed {name} dependencies"
69+
yield f"Please restart the webui to see the changes"
70+
yield True
6771
except Exception:
6872
print(f"Failed to install {name} dependencies")
6973
yield f"Failed to install {name} dependencies"
74+
yield False
7075

7176

7277
def _pip_uninstall(package_name, name):

0 commit comments

Comments
 (0)