Repository navigation
feat(server): configurable write directory via --output-dir - #2442
Conversation
Generated-file writes were hardcoded to <working-directory>/output with no way to relocate them; writes elsewhere failed with 'file write denied'. Add an --output-dir flag that resolves the writable output root, defaulting to the previous <working-directory>/output behaviour.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
!!! AI-DISCLOSURE NOTE: This change was created with the help of Qwen3.8-Flash-Next and tested by me !!!
Summary
Generated-file writes were hardcoded to /output with no way to relocate them; writes elsewhere failed with 'file write denied'. Add an --output-dir flag that resolves the writable output root, defaulting to the previous /output behaviour.
Related Issue / Discussion
n/a
Additional Information
Allows to specify where we want to have our output placed instead of a hardcoded "output/" folder.
This allows for finer control when using .DGLs..
Example:
~/models$ stable-diffusion.cpp/build/bin/sd-server --listen-port 3080 -l 0.0.0.0 --model-dir $PWD --output-dir $PWDfailure on outside allowed output-dir (absolute):

failure on outside allowed output-dir (relative):

New command line parameter: --output-dir

Checklist
Summary by CodeRabbit
--output-diroption to choose where generated files are saved. Writes outside the configured output directory are denied.