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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

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

  • Add --base-directory command line argument.
  • Refactor folder_paths import code to be re-executable.
    • Default model paths now defined in dictionary.
    • Function that iterates through them.
  • Almost* no change to existing behaviour - new function called on import.
      • The order that custom_nodes and diffusion_models are added to the cache has changed.
    • This minor change can be reverted, but requires workaround code.
  • Default model paths are created using a separate function.
    • Secondary base_paths can be added, allowing all default model paths to be added automatically with one call.
  • Reset the default base_path as early as possible in main code execution.

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.

👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants