ComfyUI_Custom_Nodes_AlekPet icon indicating copy to clipboard operation
ComfyUI_Custom_Nodes_AlekPet copied to clipboard

apipath

Open GitHub4LP opened this issue 1 year ago • 6 comments

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

GitHub4LP avatar Jul 28 '24 03:07 GitHub4LP

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())

AlekPet avatar Jul 28 '24 05:07 AlekPet

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

GitHub4LP avatar Jul 29 '24 05:07 GitHub4LP

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

AlekPet avatar Jul 29 '24 10:07 AlekPet

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?

GitHub4LP avatar Jul 30 '24 01:07 GitHub4LP

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).

AlekPet avatar Jul 30 '24 05:07 AlekPet

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.

GitHub4LP avatar Jul 30 '24 10:07 GitHub4LP