Skip to content

Using the new --base-directory option and its interaction with the comfy_extras location #6803

@mmartial

Description

@mmartial

Your question

(following here; I have posted in Discord but no follow up -- I'm just hoping to get clarification on the expectations of the feature.)

I am using the new --base-directory option and have migrated many folders within it (to /basedir).

Are we supposed also to have the comfy_extras content within that basedir?

If I do not move the content, I get an error:
FileNotFoundError: [Errno 2] No such file or directory: '/basedir/comfy_extras/nodes_clip_sdxl.py'
but the base nodes are available (KSampler, ...)

When I move the content, I get many errors (posted in logs below), and none of the base nodes (from comfy_extras) work.

Related to:

Logs

Command: ['/comfy/mnt/venv/bin/python3', './main.py', '--listen', '0.0.0.0', '--disable-auto-launch', '--base-directory', '/basedir']
[...]
ComfyUI version: 0.3.14
[Prompt Server] web root: /comfy/mnt/ComfyUI/web
Traceback (most recent call last):
  File "/comfy/mnt/ComfyUI/nodes.py", line 2113, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 991, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1128, in get_code
  File "<frozen importlib._bootstrap_external>", line 1186, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/comfy/mnt/ComfyUI/comfy_extras/nodes_latent.py/__init__.py'
Cannot import /comfy/mnt/ComfyUI/comfy_extras/nodes_latent.py module for custom nodes: [Errno 2] No such file or directory: '/comfy/mnt/ComfyUI/comfy_extras/nodes_latent.py/__init__.py'
[... repeat with the next node ... repeat ...]

Other

After some consideration (not yet confirmed), I believe this might be an issue with some custom_nodes that might use relative PATH (../comfy_extras) when accessing content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    User SupportA user needs help with something, probably not a bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions