AlekPet / ComfyUI_Custom_Nodes_AlekPet

Custom nodes that extend the capabilities of Comfyui
MIT License
799 stars 56 forks source link

apipath #68

Closed GitHub4LP closed 1 week ago

GitHub4LP commented 1 month ago

https://aistudio.baidu.com/projectdetail/8064463 启用你的插件

AlekPet commented 1 month ago

https://aistudio.baidu.com/projectdetail/8064463 启用你的插件

I looked at the code where my nodes are installed. If you mean that my repository is not cloned on startup. Line:

asyncio.run(asyncio.gather(*(asyncio.get_running_loop().run_in_executor(None, git_clone, comfyui_custom_nodes, os.path.join(comfyui_path, "custom_nodes")) for comfyui_custom_nodes in [
    'https://github.com/ltdrdata/ComfyUI-Manager.git',
    # 'https://github.com/11cafe/comfyui-workspace-manager',
    # 'https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet',
    # 'https://github.com/crystian/ComfyUI-Crystools',
    # 'https://github.com/pythongosssss/ComfyUI-Custom-Scripts',
    # 'https://github.com/ssitu/ComfyUI_UltimateSDUpscale',
    # 'https://github.com/Fannovel16/comfyui_controlnet_aux',
    # 'https://github.com/jags111/efficiency-nodes-comfyui',
    # 'https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved',
    # 'https://github.com/cubiq/ComfyUI_IPAdapter_plus'
])))

I checked it on Windows, everything is copied, maybe you can provide the error code or more detailed information, as I understand it you are not running Comfyui on a local computer.

import asyncio
import os
import subprocess

# Function git clone
def git_clone(repo_url, clone_path):
    result = subprocess.run(['git', 'clone', repo_url, clone_path], capture_output=True, text=True)
    if result.returncode == 0:
        print(f'Clone ok {repo_url} in {clone_path}')
    else:
        print(f'Clone failed {repo_url}. Error: {result.stderr}')

# Path to comfyui (test: current dir where script running)
comfyui_path = os.path.dirname(os.path.realpath(__file__))

# List url repositories
repos_to_clone = [
    'https://github.com/ltdrdata/ComfyUI-Manager.git',
    'https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet',
]

async def main():
    loop = asyncio.get_running_loop()
    await asyncio.gather(
        *(loop.run_in_executor(None, git_clone, repo_url, os.path.join(comfyui_path, "custom_nodes", os.path.basename(repo_url))) for repo_url in repos_to_clone)
    )

# Run code
asyncio.run(main())
GitHub4LP commented 1 month ago

Thank you for your response. This is a project I've published on the platform. The section is commented out because I wanted to add your plugin, but it's currently not working properly.

屏幕截图 2024-07-29 133132

AlekPet commented 1 month ago

Hello! Updated the paths of the nodes (pose and extras), please reinstall and check.

GitHub4LP commented 1 month ago

Hello! Updated the paths of the nodes (pose and extras), please reinstall and check.

The error is the same as before. Could it be that the actual file path /IDENode/lib and the URL path /lib/idenode are inconsistent?

AlekPet commented 1 month ago

Hello! Updated the paths of the nodes (pose and extras), please reinstall and check.

The error is the same as before. Could it be that the actual file path /IDENode/lib and the URL path /lib/idenode are inconsistent?

No errors with ide are not critical, since comfyui scans all folders for js files and tries to load them. But with pose and extras, I fixed it. This lines in two files https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet/issues/69#issuecomment-2256604259 . In the StableSwarmUi (https://github.com/Stability-AI/StableSwarmUI) there were the same errors with the same paths. Checks lines in the files (inspector chrome, tab source or network).

GitHub4LP commented 1 month ago

Hello! Updated the paths of the nodes (pose and extras), please reinstall and check.

The error is the same as before. Could it be that the actual file path /IDENode/lib and the URL path /lib/idenode are inconsistent?

No errors with ide are not critical, since comfyui scans all folders for js files and tries to load them. But with pose and extras, I fixed it. This lines in two files #69 (comment) . In the StableSwarmUi (https://github.com/Stability-AI/StableSwarmUI) there were the same errors with the same paths. Checks lines in the files (inspector chrome, tab source or network).

You're correct. @AlekPet Ace.js often loads after the modules that depend on it.