mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-08-07 18:58:19 +08:00
Write to a temp file in the same directory then os.replace() onto the target path. If the process crashes mid-write, the original file is left intact instead of being truncated to zero bytes. Fixes #11298