fix(studio): derive + pin COMFYUI_OUTPUT_DIR from COMFYUI_ROOT (#510 render-mount)#534
Merged
Conversation
…render-mount) #531 pinned COMFYUI_ROOT for ComfyUI's input/models mount, but the 5 output consumers (gallery :8189, orchestrator, tts, step-voice, production) mount a separate COMFYUI_OUTPUT_DIR that was never derived from COMFYUI_ROOT — it fell back to /mnt/models/comfyui/output. On any non-/mnt rig, ComfyUI wrote renders to $COMFYUI_ROOT/output while the gallery served the empty /mnt default -> 404 on generated media (the '_output_images_will_be_put_here' placeholder was the tell). - comfyui-paths.sh: derive + export COMFYUI_OUTPUT_DIR=$COMFYUI_ROOT/output - c3_persist_comfy_root: pin it to .env PER-VAR (adds OUTPUT_DIR even when ROOT was already pinned by #531 -> existing users self-heal on next studio start) - test: +7 assertions incl. the ROOT-already-pinned migration case Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EfF565T9eSLaqGzidyJ1Pm
This was referenced Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-on to #510 / #531. #531 pinned
COMFYUI_ROOTso ComfyUI's input/models mount correctly, but the output side stayed broken: the gallery (:8189) and the other four output consumers (orchestrator, tts, step-voice, production) mount a separateCOMFYUI_OUTPUT_DIRthat was never derived fromCOMFYUI_ROOT— it fell back to the hardcoded/mnt/models/comfyui/output.Symptom (reported in #510): on a non-
/mntrig, ComfyUI writes renders to$COMFYUI_ROOT/output(e.g.~/comfyui/output) while the gallery serves the empty/mnt/models/comfyui/output→ nginx 404 on the generated PNG (studio_hidream_00001_.png), and the render never appears in the gallery / OWUI. The_output_images_will_be_put_hereplaceholder returning 200/0 is the tell — the mount is live but pointed at the wrong tree.Fix
comfyui-paths.sh: derive + exportCOMFYUI_OUTPUT_DIR=$COMFYUI_ROOT/output(single source of truth, alongsideCOMFYUI_ROOT/COMFYUI_MODELS_DIR).c3_persist_comfy_root: pin it to.envper-var — so it addsCOMFYUI_OUTPUT_DIReven for users who already haveCOMFYUI_ROOTpinned from fix(studio): pin COMFYUI_ROOT to .env so ComfyUI mounts the models tree (#510, #530) #531 (they self-heal on the nextgpu-mode ai-studio), and never clobbers a hand-set value.test-comfyui-paths.sh: +7 assertions — derivation, explicit-override respect, and the ROOT-already-pinned migration case. Full file green (20/20).No compose changes needed — the consumers already read
${COMFYUI_OUTPUT_DIR:-…}; they just needed it derived + pinned.start_comfyui(which persists) runs before the gallery in the ai-studio scene, so the pin lands first.Fixes #510.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EfF565T9eSLaqGzidyJ1Pm