Spaces:
Running on Zero
Running on Zero
Describe what each control does to the sound
Browse files
app.py
CHANGED
|
@@ -183,29 +183,93 @@ def process_fn(audio_duration, prompt, lyrics, infer_step, guidance_scale, omega
|
|
| 183 |
if __name__ == "__main__":
|
| 184 |
with gr.Blocks() as demo:
|
| 185 |
input_components = [
|
| 186 |
-
gr.Slider(minimum=-1, maximum=240.0, step=1e-05, value=-1, label="Audio Duration"
|
| 187 |
-
|
| 188 |
-
gr.Textbox(label="
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
gr.
|
| 194 |
-
|
| 195 |
-
gr.Slider(minimum=
|
| 196 |
-
|
| 197 |
-
gr.
|
| 198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
gr.Textbox(label="OSS Steps"),
|
| 200 |
-
gr.Slider(minimum=0.0, maximum=10.0, step=0.1, value=0.0, label="Guidance Scale Text"
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
]
|
| 207 |
output_components = [
|
| 208 |
-
gr.Audio(type="filepath", label="Text2Music Generated Audio 1")
|
|
|
|
|
|
|
| 209 |
]
|
| 210 |
build_endpoint(
|
| 211 |
model_card=model_card,
|
|
|
|
| 183 |
if __name__ == "__main__":
|
| 184 |
with gr.Blocks() as demo:
|
| 185 |
input_components = [
|
| 186 |
+
gr.Slider(minimum=-1, maximum=240.0, step=1e-05, value=-1, label="Audio Duration",
|
| 187 |
+
info="Length of the generated song, in seconds."),
|
| 188 |
+
gr.Textbox(label="Tags", value="funk, pop, soul, rock, melodic, guitar, drums, bass, keyboard, percussion, 105 BPM, energetic, upbeat, groovy, vibrant, dynamic",
|
| 189 |
+
info=(
|
| 190 |
+
"The style to generate: genre, instrumentation, mood, tempo. This "
|
| 191 |
+
"is what steers the sound most."
|
| 192 |
+
)),
|
| 193 |
+
gr.Textbox(label="Lyrics", value="[verse]\nNeon lights they flicker bright\nCity hums in dead of night\nRhythms pulse through concrete veins\nLost in echoes of refrains\n\n[verse]\nBassline groovin' in my chest\nHeartbeats match the city's zest\nElectric whispers fill the air\nSynthesized dreams everywhere\n\n[chorus]\nTurn it up and let it flow\nFeel the fire let it grow\nIn this rhythm we belong\nHear the night sing out our song\n\n[verse]\nGuitar strings they start to weep\nWake the soul from silent sleep\nEvery note a story told\nIn this night we\u2019re bold and gold\n\n[bridge]\nVoices blend in harmony\nLost in pure cacophony\nTimeless echoes timeless cries\nSoulful shouts beneath the skies\n\n[verse]\nKeyboard dances on the keys\nMelodies on evening breeze\nCatch the tune and hold it tight\nIn this moment we take flight\n",
|
| 194 |
+
info="The words to sing. Leave it empty for an instrumental."),
|
| 195 |
+
gr.Slider(minimum=1, maximum=200, step=1, value=60, label="Infer Steps",
|
| 196 |
+
info="More steps give a cleaner result and take longer."),
|
| 197 |
+
gr.Slider(minimum=0.0, maximum=30.0, step=0.1, value=15.0, label="Guidance Scale",
|
| 198 |
+
info=(
|
| 199 |
+
"How closely the result follows the tags and lyrics. Higher values "
|
| 200 |
+
"track them more literally and tend to sound less natural."
|
| 201 |
+
)),
|
| 202 |
+
gr.Slider(minimum=-100.0, maximum=100.0, step=0.1, value=10.0, label="Granularity Scale",
|
| 203 |
+
info=(
|
| 204 |
+
"Controls how much fine detail the model commits to. Raise it for a "
|
| 205 |
+
"busier, more detailed arrangement."
|
| 206 |
+
)),
|
| 207 |
+
gr.Textbox(label="manual seeds (default None)",
|
| 208 |
+
info=(
|
| 209 |
+
"Fixes the result, so the same seed and settings give the same "
|
| 210 |
+
"song. Leave it empty for a new one each run."
|
| 211 |
+
)),
|
| 212 |
+
gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.5, label="Guidance Interval",
|
| 213 |
+
info=(
|
| 214 |
+
"The portion of generation over which guidance is applied. Narrower "
|
| 215 |
+
"intervals leave the model freer at the start and end."
|
| 216 |
+
)),
|
| 217 |
+
gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.0, label="Guidance Interval Decay",
|
| 218 |
+
info=(
|
| 219 |
+
"How quickly guidance falls off across that interval. Higher values "
|
| 220 |
+
"let the ending wander further from the prompt."
|
| 221 |
+
)),
|
| 222 |
+
gr.Slider(minimum=0.0, maximum=200.0, step=0.1, value=3.0, label="Min Guidance Scale",
|
| 223 |
+
info=(
|
| 224 |
+
"The floor guidance decays to, so the prompt is never ignored "
|
| 225 |
+
"entirely."
|
| 226 |
+
)),
|
| 227 |
+
gr.Checkbox(value=True, label="use ERG for tag",
|
| 228 |
+
info=(
|
| 229 |
+
"Applies the model's tag-conditioning refinement. Leave off unless "
|
| 230 |
+
"the style is being ignored."
|
| 231 |
+
)),
|
| 232 |
+
gr.Checkbox(value=False, label="use ERG for lyric",
|
| 233 |
+
info=(
|
| 234 |
+
"Applies the same refinement to the lyrics, which can improve how "
|
| 235 |
+
"clearly words are sung."
|
| 236 |
+
)),
|
| 237 |
+
gr.Checkbox(value=True, label="use ERG for diffusion",
|
| 238 |
+
info=(
|
| 239 |
+
"Applies the refinement during diffusion. On by default, and "
|
| 240 |
+
"turning it off is faster but rougher."
|
| 241 |
+
)),
|
| 242 |
gr.Textbox(label="OSS Steps"),
|
| 243 |
+
gr.Slider(minimum=0.0, maximum=10.0, step=0.1, value=0.0, label="Guidance Scale Text",
|
| 244 |
+
info=(
|
| 245 |
+
"Weighs the text prompt separately from the lyrics. Raise it to "
|
| 246 |
+
"favour the described style."
|
| 247 |
+
)),
|
| 248 |
+
gr.Slider(minimum=0.0, maximum=10.0, step=0.1, value=0.0, label="Guidance Scale Lyric",
|
| 249 |
+
info=(
|
| 250 |
+
"Weighs the lyrics separately from the style. Raise it to favour "
|
| 251 |
+
"clearly sung words."
|
| 252 |
+
)),
|
| 253 |
+
gr.Checkbox(value=False, label="Enable Audio2Audio",
|
| 254 |
+
info=(
|
| 255 |
+
"Uses the reference track below as a starting point instead of "
|
| 256 |
+
"generating from nothing."
|
| 257 |
+
)),
|
| 258 |
+
gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.5, label="Refer audio strength",
|
| 259 |
+
info=(
|
| 260 |
+
"How much of the reference track survives. Low values keep more of "
|
| 261 |
+
"it, high values depart further."
|
| 262 |
+
)),
|
| 263 |
+
gr.Audio(type="filepath", label="Reference Audio (for Audio2Audio)").set_info((
|
| 264 |
+
"The track to start from. Only used when Audio2Audio is enabled."
|
| 265 |
+
)),
|
| 266 |
+
gr.Dropdown(choices=["ACE-Step/ACE-Step-v1-chinese-rap-LoRA", "none"], value="none", label="Lora Name or Path",
|
| 267 |
+
info="An optional fine-tune to load on top of the base model."),
|
| 268 |
]
|
| 269 |
output_components = [
|
| 270 |
+
gr.Audio(type="filepath", label="Text2Music Generated Audio 1").set_info((
|
| 271 |
+
"The generated song."
|
| 272 |
+
)),
|
| 273 |
]
|
| 274 |
build_endpoint(
|
| 275 |
model_card=model_card,
|