Skip to content

feat(audio): Add ComfyUI workflows for Stable Audio Open 3.0 & YuE music generation - #19

Closed
spelech wants to merge 2 commits into
mainfrom
feat/audio-workflows-stable-audio-yue-1867311793696123301
Closed

feat(audio): Add ComfyUI workflows for Stable Audio Open 3.0 & YuE music generation#19
spelech wants to merge 2 commits into
mainfrom
feat/audio-workflows-stable-audio-yue-1867311793696123301

Conversation

@spelech

@spelech spelech commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Adds ComfyUI audio workflow presets for Stable Audio Open 3.0 and YuE full song generation, implements GET /api/audio/workflows, POST /api/audio/generate, and GET /api/audio/files endpoints, and adds Audio Studio with waveform visualizer and player controls to Engine Studio UI.

Fixes #12


PR created automatically by Jules for task 1867311793696123301 started by @spelech

…sic generation

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@spelech

spelech commented Aug 24, 2026

Copy link
Copy Markdown
Owner Author

🔍 Code Review: PR #19 - ComfyUI Audio Workflows (Stable Audio Open 3.0 & YuE)

📋 Overview & Compliance Matrix

Requirement (Issue #12) Status Notes
ComfyUI workflow JSON presets in Workflows/Audio/ ✅ Complete stable_audio_open_sfx.json & yue_full_song.json correctly structured
GET /api/audio/workflows endpoint ✅ Complete Discovers and parses presets with fallback metadata
POST /api/audio/generate endpoint ✅ Complete Parameter substitution (prompt, negative prompt, seed, duration) & ComfyUI queuing
GET /api/audio/files endpoint ✅ Complete Lists .wav, .flac, .mp3 outputs with static URL mapping
Studio UI Controls & Waveform Visualizer ✅ Complete Workflow selector, duration, seed, prompt inputs, play/pause toggle, and amplitude peak visualizer
Automated Integration Tests ✅ Complete Added tests in ServerEndpointsTests.cs; all pass cleanly

🌟 Key Strengths

  1. Robust Workflow Graph Parameter Injection: In Endpoints/WorkflowEndpoints.cs, parameter substitution dynamically inspects graph nodes for CLIPTextEncode, prompt/lyrics titles, seed/noise_seed, and seconds/duration, making the substitution flexible across both single and dual-track workflows.
  2. Graceful Offline Fallbacks: AudioStudioViewModel.LoadAudioWorkflowsAsync includes built-in fallback preset models if the backend server is temporarily unreachable, maintaining UI responsiveness.
  3. Telemetry Robustness: The change in TelemetryViewModel.cs prevents overwriting genuine detected GPU names with generic placeholder strings.
  4. Theme & UI Integration: Engine studio UI cleanly integrates into the existing Matte design language with controls for duration (NumericUpDown), seed, prompt wrapping, and waveform visualizer bars.

💡 Suggestions & Minor Improvements

1. Security / Path Traversal Sanitization in POST /api/audio/generate

In Endpoints/WorkflowEndpoints.cs:

// Current:
var audioWorkflowPath = Path.Combine(workflowsDir, "Audio", $"{request.WorkflowId}.json");

Suggestion: Sanitize request.WorkflowId with Path.GetFileNameWithoutExtension(request.WorkflowId) or validate using Program.IsSafePath to prevent potential directory traversal if malicious input is submitted:

var safeId = Path.GetFileNameWithoutExtension(request.WorkflowId);
var audioWorkflowPath = Path.Combine(workflowsDir, "Audio", $"{safeId}.json");
if (!File.Exists(audioWorkflowPath))
{
    audioWorkflowPath = Path.Combine(workflowsDir, $"{safeId}.json");
}

2. Unit Testing for AudioStudioViewModel

ServerEndpointsTests.cs verifies the HTTP server endpoints thoroughly. Adding a unit test fixture for AudioStudioViewModel in LocalLLMServerManager.Tests/ (e.g. testing TogglePlay(), PlayButtonText, and fallback loading) will ensure ViewModel regression protection.


🏁 Verdict

Overall Verdict: APPROVED (with non-blocking suggestions).
The changes satisfy the requirements of Issue #12 and integrate seamlessly with the existing server and UI architecture.

…sic generation

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
spelech added a commit that referenced this pull request Aug 24, 2026
@spelech

spelech commented Aug 24, 2026

Copy link
Copy Markdown
Owner Author

Integrated and merged into main as part of release v3.7.0.

@spelech spelech closed this Aug 24, 2026
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.

feat(audio): Add ComfyUI workflows for Stable Audio Open 3.0 & YuE music generation

1 participant