Coder Social home page Coder Social logo

Comments (5)

doombeaker avatar doombeaker commented on May 30, 2024

siliconflow/onediff_comfy_nodes 仓库是个临时解决方案。而且是手工同步的。所以会因为更新不及时导致这样那样的问题。

这次更新,最好直接使用 onediff 仓库作为 ComfyUI Manager 的源。ComfyUI Manager 之前说未来会支持 sub folder 的插件,不知道现在已经有了没。

如果不支持,就需要自己编写下 py 脚本(ComfyUI Manager 有约定,会运行插件目录下的 install.py 等文件),这个可以参考下 ComfyUI Manager 的文档,或者其它的插件仓库。

from onediff.

nono-Sang avatar nono-Sang commented on May 30, 2024

一些尝试

现实是,ComfyUI Manager 目前仍然不支持自定义节点存在于 sub folder 中(个人觉得 CLI 模式下添加这个功能是不难的,但是在 UI 操作下实现可能会有不少麻烦),而将 onediff_comfy_nodes 作为一个单独的仓库也不是个长久之计。因此,只能尝试通过脚本来控制安装过程。

在 CLI 模式下,ComfyUI Manager 安装 Onediff 本质上包括以下步骤:

  • 将指定的仓库 clone 到 xxx/ComfyUI/custom_nodes/ 目录下。需要注意的是,命令行安装时需要指定 node name,例如,python cm-cli.py install onediff_comfy_nodes,而 node name 是与仓库的 URL 对应的,即 node_name = url.split('/')[-1]。由于目前仓库是 https://github.com/siliconflow/onediff_comfy_nodes,所以 node name 就是 onediff_comfy_nodes
  • 在自定义节点目录下,分别执行 pip install -r requirements.txt 以及 python install.py

完成安装后,相关的文件结构是:

ComfyUI/
    custom_nodes/
        ComfyUI Manager/
        onediff_comfy_nodes/
            install.py
            requirements.txt

现在,我们把 URL 改成 https://github.com/siliconflow/onediff (正式的修改需要向 ComfyUI Manager 提 PR,这里仅作为测试),即将 Onediff 仓库作为下载源。注意,此时的 node name 变为 onediff。在提供 requirements.txtinstall.py 两个文件后,相关文件结构如下:

ComfyUI/
    custom_nodes/
        ComfyUI Manager/
        onediff/
            onediff_comfy_nodes/
            install.py
            requirements.txt

上面的这个文件组织是无法被 ComfyUI 接受的,因为 onediff_comfy_nodes 没有在 custom_nodes 目录下。但是通过在 install.py 中加入一些文件操作,可以很容易实现这一点,即将文件结构变为:

ComfyUI/
    custom_nodes/
        ComfyUI Manager/
        onediff_comfy_nodes/

此时,安装虽然是成功的(自定义节点的使用也没问题),但无法成功查找和卸载。这是因为,ComfyUI Manager 是基于 onediff 这个 node name 在 xxx/ComfyUI/custom_nodes/ 目录下进行文件查找的,那自然是失败的。因此,如果想要解决这个问题,就需要进行重命名,将文件结构变为:

ComfyUI/
    custom_nodes/
        ComfyUI Manager/
        onediff/

然而,这一步会引入 onediff package 重名的问题......

from onediff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.