mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-18 21:30:11 +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