Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix([issue-735]): address claude+codex review
[._.]/ Adam Eivyb48109b4ba24
diff --git a/client/src/components/pipeline/stages/AudioStage.jsx b/client/src/components/pipeline/stages/AudioStage.jsxindex 52d41a4b8d..e46ff322b3 100644--- a/client/src/components/pipeline/stages/AudioStage.jsx+++ b/client/src/components/pipeline/stages/AudioStage.jsx@@ -97,6 +97,7 @@ export default function AudioStage({ issue, onStageUpdate }) {defaultDurationSec: generators.defaultDurationSec,minDurationSec: generators.minDurationSec,maxDurationSec: generators.maxDurationSec,+ installEnv: 'INSTALL_MUSICGEN',ready: generators.ready,}]: []);@@ -566,7 +567,7 @@ export default function AudioStage({ issue, onStageUpdate }) {{!activeEngine?.ready ? (<p className="text-xs text-gray-400">{activeEngine?.name || 'This engine'} isn't installed yet. Run{' '}- <code className="text-gray-300">INSTALL_{(activeEngine?.id || 'musicgen').toUpperCase()}=1 bash scripts/setup-image-video.sh</code>{' '}+ <code className="text-gray-300">{activeEngine?.installEnv || `INSTALL_${(activeEngine?.id || 'musicgen').toUpperCase()}`}=1 bash scripts/setup-image-video.sh</code>{' '}to bootstrap its runtime, then reopen this panel.</p>) : (diff --git a/scripts/generate_audioldm2.py b/scripts/generate_audioldm2.pyindex 22d824d29c..b850f1be08 100644--- a/scripts/generate_audioldm2.py+++ b/scripts/generate_audioldm2.py@@ -152,7 +152,12 @@ def main():pipe = AudioLDM2Pipeline.from_pretrained(args.model, torch_dtype=dtype)pipe = pipe.to(device)- generator = torch.Generator(device=device).manual_seed(int(args.seed or 0))+ # PyTorch's MPS backend does not support torch.Generator(device='mps') — it+ # raises before inference on Apple Silicon (our primary target). Seed on CPU+ # there; diffusers accepts a CPU generator for an MPS pipeline. CUDA/CPU use+ # their native device generator. https://github.com/pytorch/pytorch/issues/84288+ generator_device = "cpu" if device == "mps" else device+ generator = torch.Generator(device=generator_device).manual_seed(int(args.seed or 0))log_stage("generate", f"{duration:.1f}s/{steps}steps")out = pipe(diff --git a/server/routes/pipeline.js b/server/routes/pipeline.jsindex 7ad42d882e..810225a94c 100644--- a/server/routes/pipeline.js+++ b/server/routes/pipeline.js@@ -911,6 +911,9 @@ router.get('/audio/music/generators', asyncHandler(async (_req, res) => {defaultDurationSec: engine.defaultDurationSec,minDurationSec: engine.minDurationSec,maxDurationSec: engine.maxDurationSec,+ // The authoritative install-hint env var (e.g. INSTALL_AUDIOLDM2) so the UI+ // renders the exact command instead of re-deriving it from the engine id.+ installEnv: engine.installEnv,ready: isEngineReady(engine.id),}));const fallback = engines.find((e) => e.id === DEFAULT_ENGINE_ID) ?? engines[0];diff --git a/server/services/pipeline/musicGen.js b/server/services/pipeline/musicGen.jsindex 7f7940287e..69688013a8 100644--- a/server/services/pipeline/musicGen.js+++ b/server/services/pipeline/musicGen.js@@ -247,7 +247,7 @@ export async function generateMusic({ prompt, engine: engineId = DEFAULT_ENGINE_// token isn't required — but pass it through when the user has one set so the// first download doesn't hit anonymous HF rate limits.const env = safeChildProcessEnv(await hfTokenEnv());- const result = await runSidecarProcess({ bin, args, env, signal });+ const result = await runSidecarProcess({ bin, args, env, signal, engineId: engine.id });// A clean exit isn't enough — the sidecar could exit 0 yet write nothing (or// a truncated file) if the runtime changes shape. Require both a parsed// RESULT line AND a non-empty file on disk before we persist the library@@ -277,7 +277,7 @@ export async function generateMusic({ prompt, engine: engineId = DEFAULT_ENGINE_// line and a bounded stderr tail for the failure reason. Not a route handler —// the spawn-error / close branches must not throw (they run outside the Express// lifecycle), so they resolve a structured result instead.-function runSidecarProcess({ bin, args, env, signal }) {+function runSidecarProcess({ bin, args, env, signal, engineId = DEFAULT_ENGINE_ID }) {return new Promise((resolve) => {const proc = spawn(bin, args, { env, stdio: ['ignore', 'pipe', 'pipe'] });let stdout = '';@@ -299,7 +299,7 @@ function runSidecarProcess({ bin, args, env, signal }) {stderrTail = (stderrTail + s).slice(-STDERR_TAIL);for (const line of s.split(/\r?\n/)) {const t = line.trim();- if (t.startsWith('STAGE:')) console.log(`🎼 musicgen ${t.slice('STAGE:'.length)}`);+ if (t.startsWith('STAGE:')) console.log(`🎼 ${engineId} ${t.slice('STAGE:'.length)}`);}});proc.on('error', (err) => finish({ ok: false, reason: `spawn failed: ${err.message}`, stdout }));