You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
comfyui: install --reinstall deletes the user's models, saved workflows and outputs without warning #530
rocm comfyui install --reinstall calls fs::remove_dir_all on the ComfyUI source folder as soon as the flag is set (apps/rocm/src/comfyui.rs, install), before downloading anything. That folder holds everything the user has added to ComfyUI:
source/models: the folder rocm comfyui models-path returns and the install and status output prints as models path:.
source/user: saved workflows. start() runs main.py from source without --user-directory.
source/output: generated images. start() runs without --output-directory.
There is no prompt, backup or move-aside, and --dry-run doesn't mention the deletion. The install command it prints also leaves --reinstall out. If the download then fails, the user has neither an install nor their data.
Expected behavior
A reinstall replaces ComfyUI's code but keeps models/, user/ and output/, or at minimum states plainly, in the plan and the dry run, that they will be deleted.
Steps to reproduce
Have a ComfyUI install, with a file in source/models/checkpoints/, a saved workflow in source/user/default/workflows/, and an image in source/output/.
Point the source download at an unreachable URL, so step 3 fails after the deletion.
rocm comfyui install --reinstall
Observed: Downloading ComfyUI source... and then Error: failed to download …, exit 1. Afterwards the ComfyUI directory holds only downloads/ and logs/; the model, workflow and image are gone. With a working download the result is the same, but you get a fresh install.
--reinstall --dry-run prints the models path and an install command with no --reinstall and no mention of deletion.
Possible solution
Download and unpack the new source into a staging directory first. Then swap it in, carrying models/, user/ and output/ across, or start ComfyUI with --output-directory/--user-directory/an extra-models config that points outside source, so a reinstall never touches them. The dry run should state what a reinstall replaces.
Environment
Built from main. Platform-independent.
How it was found
Property-testing every recursive-deletion site against a real filesystem, then reproduced with the built binary in a sandbox.
Activity
fix(comfyui): reinstall replaces only the code, never the user's files
fix(comfyui): reinstall replaces only ComfyUI's code, never the user'…