Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow changing folder_paths.base_path via command line argument. #6600

Merged

Conversation

webfiltered
Copy link
Collaborator

@webfiltered webfiltered commented Jan 25, 2025

Current

  • The base_path and models_dir properties of folder_paths are set during file import.
  • Many extensions are using these directly.
  • The ComfyUI directory cannot be read-only.

Proposed (Updated w/requested refactor)

  • Add --base-directory command line argument.
  • Almost* no change to existing behaviour
      • cli_args is now imported prior to folder_paths - nil impact expected.

Revert "nit - Reorder default_paths back top top of file."

This reverts commit fdfd81a.

Revert "Extend add_model_folder_path for use with built-ins."

This reverts commit a30d74d.

Revert "Reorder to keep default model paths grouped together."

This reverts commit 9c9a853.

Revert "Update type hint to reflect actual usage."

This reverts commit 74325a5.

Revert "Allow default model paths to be re-used with other base paths."

This reverts commit fa3d639.

Revert "Allow complete reset of default directories under a new base_path."

This reverts commit 6e3b261.
Copy link

@wibur0620 wibur0620 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Copy link
Collaborator

@robinjhuang robinjhuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synced offline. Can first make a PR with the simplest change: just import cli_args in folder_paths and set the base_path there.

@robinjhuang robinjhuang added the Good PR This PR looks good to go, it needs comfy's final review. label Jan 28, 2025
@comfyanonymous comfyanonymous merged commit 222f48c into comfyanonymous:master Jan 29, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good PR This PR looks good to go, it needs comfy's final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants