Skip to content

fix(studio): derive + pin COMFYUI_OUTPUT_DIR from COMFYUI_ROOT (#510 render-mount)#534

Merged
noonghunna merged 1 commit into
masterfrom
fix/comfyui-output-dir
Jul 1, 2026
Merged

fix(studio): derive + pin COMFYUI_OUTPUT_DIR from COMFYUI_ROOT (#510 render-mount)#534
noonghunna merged 1 commit into
masterfrom
fix/comfyui-output-dir

Conversation

@noonghunna

Copy link
Copy Markdown
Owner

What

Follow-on to #510 / #531. #531 pinned COMFYUI_ROOT so 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 separate COMFYUI_OUTPUT_DIR that was never derived from COMFYUI_ROOT — it fell back to the hardcoded /mnt/models/comfyui/output.

Symptom (reported in #510): on a non-/mnt rig, ComfyUI writes renders to $COMFYUI_ROOT/output (e.g. ~/comfyui/output) while the gallery serves the empty /mnt/models/comfyui/outputnginx 404 on the generated PNG (studio_hidream_00001_.png), and the render never appears in the gallery / OWUI. The _output_images_will_be_put_here placeholder returning 200/0 is the tell — the mount is live but pointed at the wrong tree.

Fix

  • comfyui-paths.sh: derive + export COMFYUI_OUTPUT_DIR=$COMFYUI_ROOT/output (single source of truth, alongside COMFYUI_ROOT / COMFYUI_MODELS_DIR).
  • c3_persist_comfy_root: pin it to .env per-var — so it adds COMFYUI_OUTPUT_DIR even for users who already have COMFYUI_ROOT pinned from fix(studio): pin COMFYUI_ROOT to .env so ComfyUI mounts the models tree (#510, #530) #531 (they self-heal on the next gpu-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

…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
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.

[bug] Trying to generate a picture in ai-studio with the Hi-Dream lane results in Image generation failed: ComfyUI generation error

1 participant