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 override of folder_paths.base_path via env var #6577

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

webfiltered
Copy link
Collaborator

  • Allows the configuration of the default ComfyUI folders via environment variable.
  • Provides a number of the pre-requisites for ComfyUI to be executed from a read-only location.
  • Covers additional folders with Remove redundant code from folder_paths #6576.
  • No change if env var is not set.

@robinjhuang
Copy link
Collaborator

robinjhuang commented Jan 23, 2025

This will allow custom nodes to reference models that are placed in directories other than the default ComfyUI/models. Needed in configurations like the desktop app.

eg. ComfyUI-HunyuanVideoWrapper

clip_model_path = os.path.join(folder_paths.models_dir, "clip", "clip-vit-large-patch14")
            if not os.path.exists(clip_model_path):

@iwr-redmond
Copy link

The custom_nodes and, possibly more importantly, models_dir/configs folders both have preloaded files that I assume will need to remain available. Shouldn't there be a copy process if the env var is set (default -> override), or alternatively, some additional code to add these standard folders back as extra paths?

@webfiltered webfiltered marked this pull request as ready for review January 23, 2025 20:57
@robinjhuang
Copy link
Collaborator

The custom_nodes and, possibly more importantly, models_dir/configs folders both have preloaded files that I assume will need to remain available. Shouldn't there be a copy process if the env var is set (default -> override), or alternatively, some additional code to add these standard folders back as extra paths?

In the desktop app we can definitely add those model config files to the search path automatically. In core, I don't think that is necessary.

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.

3 participants