Skip to content

If input directory does not exist it is not created soon enough by Comfyui #13688

@njcray2

Description

@njcray2

Custom Node Testing

Expected Behavior

When using --input-directory M:/somewhere/input if the input directory does not exist it is created.

Actual Behavior

Input directory is created - but not until we get the errors

Error while calling comfy_entrypoint in M:\pinokio\api\comfy.git\app\comfy_extras\nodes_audio.py: [WinError 3] The system cannot find the path specified: 'M:\\somewhere\\input'

and

WARNING: some comfy_extras/ nodes did not import correctly. This may be because they are missing some dependencies.

IMPORT FAILED: nodes_audio.py

This issue might be caused by new missing dependencies added the last time you updated ComfyUI.
Please do a: pip install -r requirements.txt

What is happening is that nodes_audio.py tries to access the input directory to find out what is in there and will fail if the directory does not exist:

class LoadAudio(IO.ComfyNode):
    @classmethod
    def define_schema(cls):
        input_dir = folder_paths.get_input_directory()
        files = folder_paths.filter_files_content_types(os.listdir(input_dir), ["audio", "video"])

However later on loads_node_3d.py creates the input directory if it is missing, before trying to scan its contents so the input directory does always get created eventually:

class Load3D(IO.ComfyNode):
    @classmethod
    def define_schema(cls):
        input_dir = os.path.join(folder_paths.get_input_directory(), "3d")

        os.makedirs(input_dir, exist_ok=True)

        input_path = Path(input_dir)

Clearly nodes_audio.py should use the same logic and also create the directory if it is missing.

Steps to Reproduce

Add option --input-directory M:/somewhere/input pointing somewhere that does not exist yet.

Debug Logs

M:\pinokio\api\comfy.git\app>conda_hook & conda deactivate & conda deactivate & conda deactivate & conda activate base & M:\pinokio\api\comfy.git\app\env\Scripts\activate M:\pinokio\api\comfy.git\app\env && python main.py --disable-all-custom-nodes --cache-none --use-sage-attention --disable-cuda-malloc --front-end-version Comfy-Org/ComfyUI_frontend@latest --output-directory M:/somewhere/output --input-directory M:/somewhere/input --temp-directory M:/somewhere/temp
setup plugin alembic.autogenerate.schemas
setup plugin alembic.autogenerate.tables
setup plugin alembic.autogenerate.types
setup plugin alembic.autogenerate.constraints
setup plugin alembic.autogenerate.defaults
setup plugin alembic.autogenerate.comments
Setting output directory to: M:\somewhere\output
Setting input directory to: M:\somewhere\input
Found comfy_kitchen backend cuda: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['apply_rope', 'apply_rope1', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'scaled_mm_nvfp4']}
Found comfy_kitchen backend eager: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['apply_rope', 'apply_rope1', 'dequantize_mxfp8', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'scaled_mm_mxfp8', 'scaled_mm_nvfp4']}
Found comfy_kitchen backend triton: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['apply_rope', 'apply_rope1', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8']}
Checkpoint files will always be loaded safely.
Total VRAM 16376 MB, total RAM 65129 MB
pytorch version: 2.10.0+cu130
xformers version: 0.0.35
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4070 Ti SUPER : native
Using async weight offloading with 2 streams
Enabled pinned memory 26051.0
working around nvidia conv3d memory bug.
Using sage attention
aimdo: src-win/cuda-detour.c:77:INFO:aimdo_setup_hooks: found driver at 00007FFA0FFA0000, installing 4 hooks
aimdo: src-win/cuda-detour.c:61:DEBUG:install_hook_entrys: hooks successfully installed
aimdo: src/control.c:69:INFO:comfy-aimdo inited for GPU: NVIDIA GeForce RTX 4070 Ti SUPER (VRAM: 16375 MB)
DynamicVRAM support detected and enabled
Python version: 3.13.11 (main, Dec 17 2025, 21:09:15) [MSC v.1944 64 bit (AMD64)]
ComfyUI version: 0.20.1
comfy-aimdo version: 0.2.14
comfy-kitchen version: 0.2.8
Setting temp directory to: M:\somewhere\temp\temp
Initializing frontend: Comfy-Org/ComfyUI_frontend@latest, requesting version details from GitHub...
[Prompt Server] web root: M:\pinokio\api\comfy.git\app\web_custom_versions\Comfy-Org_ComfyUI_frontend\1.44.15
Asset seeder disabled
Error while calling comfy_entrypoint in M:\pinokio\api\comfy.git\app\comfy_extras\nodes_audio.py: [WinError 3] The system cannot find the path specified: 'M:\\somewhere\\input'
Skipping loading of custom nodes
WARNING: some comfy_extras/ nodes did not import correctly. This may be because they are missing some dependencies.

IMPORT FAILED: nodes_audio.py

This issue might be caused by new missing dependencies added the last time you updated ComfyUI.
Please do a: pip install -r requirements.txt

Context impl SQLiteImpl.
Will assume non-transactional DDL.
Disabling intermediate node cache.

Other

This is obviously a very minor inconvenience but a bit untidy if you like to switch directories for different projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Potential BugUser is reporting a bug. This should be tested.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions