Fix async generator syntax errors in tab files

Changed return statements to yield + return in async generator
functions. Python doesn't allow 'return' with a value in generators.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-26 23:16:39 +01:00
parent 1513f1fefa
commit b6eb73dea4
5 changed files with 10 additions and 5 deletions

View File

@@ -161,7 +161,7 @@ def create_audiogen_tab(
prompt, variant, duration, temperature, cfg_coef, top_k, top_p, seed prompt, variant, duration, temperature, cfg_coef, top_k, top_p, seed
): ):
if not prompt: if not prompt:
return ( yield (
gr.update(value="Please enter a prompt"), gr.update(value="Please enter a prompt"),
gr.update(), gr.update(),
gr.update(), gr.update(),
@@ -169,6 +169,7 @@ def create_audiogen_tab(
gr.update(), gr.update(),
gr.update(), gr.update(),
) )
return
yield ( yield (
gr.update(value="🔄 Generating..."), gr.update(value="🔄 Generating..."),

View File

@@ -217,7 +217,7 @@ def create_jasco_tab(
prompt, variant, chords, drums, duration, bpm, temperature, cfg_coef, top_k, top_p, seed prompt, variant, chords, drums, duration, bpm, temperature, cfg_coef, top_k, top_p, seed
): ):
if not chords: if not chords:
return ( yield (
gr.update(value="Please enter a chord progression"), gr.update(value="Please enter a chord progression"),
gr.update(), gr.update(),
gr.update(), gr.update(),
@@ -225,6 +225,7 @@ def create_jasco_tab(
gr.update(), gr.update(),
gr.update(), gr.update(),
) )
return
yield ( yield (
gr.update(value="🔄 Generating..."), gr.update(value="🔄 Generating..."),

View File

@@ -184,7 +184,7 @@ def create_magnet_tab(
prompt, variant, duration, temperature, cfg_coef, top_k, top_p, decoding_steps, span_arr, seed prompt, variant, duration, temperature, cfg_coef, top_k, top_p, decoding_steps, span_arr, seed
): ):
if not prompt: if not prompt:
return ( yield (
gr.update(value="Please enter a prompt"), gr.update(value="Please enter a prompt"),
gr.update(), gr.update(),
gr.update(), gr.update(),
@@ -192,6 +192,7 @@ def create_magnet_tab(
gr.update(), gr.update(),
gr.update(), gr.update(),
) )
return
yield ( yield (
gr.update(value="🔄 Generating..."), gr.update(value="🔄 Generating..."),

View File

@@ -189,7 +189,7 @@ def create_musicgen_tab(
prompt, variant, duration, temperature, cfg_coef, top_k, top_p, seed, melody prompt, variant, duration, temperature, cfg_coef, top_k, top_p, seed, melody
): ):
if not prompt: if not prompt:
return ( yield (
gr.update(value="Please enter a prompt"), gr.update(value="Please enter a prompt"),
gr.update(), gr.update(),
gr.update(), gr.update(),
@@ -197,6 +197,7 @@ def create_musicgen_tab(
gr.update(), gr.update(),
gr.update(), gr.update(),
) )
return
# Update status # Update status
yield ( yield (

View File

@@ -161,7 +161,7 @@ def create_style_tab(
prompt, variant, style_audio, duration, temperature, cfg_coef, top_k, top_p, seed prompt, variant, style_audio, duration, temperature, cfg_coef, top_k, top_p, seed
): ):
if not style_audio: if not style_audio:
return ( yield (
gr.update(value="Please upload a style reference audio"), gr.update(value="Please upload a style reference audio"),
gr.update(), gr.update(),
gr.update(), gr.update(),
@@ -169,6 +169,7 @@ def create_style_tab(
gr.update(), gr.update(),
gr.update(), gr.update(),
) )
return
yield ( yield (
gr.update(value="🔄 Generating..."), gr.update(value="🔄 Generating..."),