2kpr / ComfyUI-UltraPixel

GNU Affero General Public License v3.0
215 stars 11 forks source link

Unable to import plugin #12

Open cjc999 opened 3 months ago

cjc999 commented 3 months ago

Always prompt this error: import wandb ModuleNotFoundError: import of wandb halted; None in sys.modules

I have installed this Wandb multiple times, but it still doesn't work. How can I solve it?

Stone-dielianhua commented 3 months ago

same question image

2kpr commented 3 months ago

I just wiped my whole ComfyUI and tried installing it and this ComfyUI-UltraPixel two ways:

up

How are you installing ComfyUI-UltraPixel, manually or with the comfyui manager?

I know of many that got this working just fine on Windows so it isn't that.

DragonQuix commented 3 months ago

I have the same problem. I installed ComfyUI-UltraPixel by manager and git clone then pip -r requirements.txt. I can think of one possible cause is that we are maybe in mainland China (I am),and github is blocked so we have to use mirror image github sites maybe?

DragonQuix commented 3 months ago

this maybe why: https://github.com/jtydhr88/ComfyUI-Unique3D/issues/8#issuecomment-2201885173

cjc999 commented 3 months ago

我刚刚擦除了我的整个 ComfyUI 并尝试以两种方式安装它和这个 ComfyUI-UltraPixel:

  • 我 git 克隆了 ComfyUI,然后从它克隆的目录中运行 pip -r requirements.txt,然后我转到custom_nodes目录,git 克隆了 ComfyUI-UltraPixel,然后从它克隆的目录中运行 pip -r requirements.txt,启动 ComfyUI 并加载workflow-default.json并运行它,它运行起来没有问题。
  • 我 git 克隆了 ComfyUI,然后从其克隆的目录中运行 pip -r requirements.txt,然后我转到custom_nodes目录,git 克隆了 https://github.com/ltdrdata/ComfyUI-Manager,重新启动了 ComfyUI,然后我从 ComfyUI 中使用了 ComfyUI 管理器(见下图)安装 ComfyUI-UltraPixel 并加载了workflow-default.json并运行它,它运行良好。

向上

您如何手动或使用 comfyui 管理器安装 ComfyUI-UltraPixel?

我知道很多人在 Windows 上都能很好地运行,所以事实并非如此。

I did not install UltraPixel using a clean version of ComfyUI, but there are also people with this issue here and on bilibili.com, indicating that this is not a personal issue of mine. You cannot expect all users to use a clean version of ComfyUI to individually install and use this plugin; this is not realistic.

DragonQuix commented 3 months ago

搞了一天,搞定了。回来报告一下,主要原因是秋叶整合包里面似乎把wandb屏蔽了。解决方法有两个,一是自己另外下载一个原版的comfyui,再安装这个节点;另一个方法是在秋叶整合包里安装好这个节点后,把节点源代码里面所有"import wandb"的字眼都删掉,大概有四个地方。这两个方法我都试过,都成功出图了。

English version: Spent a whole day on it, but it’s finally sorted out. Reporting back, the main reason seems to be that the Akiha integration package (qiuye integration package,which most Chinese are using) has blocked wandb. There are two solutions:

1.Download a separate original version of ComfyUI and install the node. 2.After installing the node in the Akiha integration package, delete all occurrences of "import wandb" from the node's source code, which appear in about four places.

I've tried both methods, and both successfully produced images.

cjc999 commented 3 months ago

在哪个文件里修改?你这样好像是把wandb这个模块直接抛弃不用了,虽然这个模块其实在这个节点中也没啥用处。

DragonQuix commented 3 months ago

有四个文件,自己用VS Code搜一下源代码文件夹就可以找到

2kpr commented 3 months ago

As of 7/18, having constructed ComfyUI-UltraPixel using the original code from https://github.com/catcathh/UltraPixel, I'm now going to completely rewrite ComfyUI-UltraPixel such that it has much better integration with ComfyUI's native code vs basically ComfyUI-UltraPixel just being a 'modified wrapper' around the original UltraPixel code. This will use / bring with it the 'standard' ComfyUI prompt/clip handling and model loading, positive/negative weighted prompting, no longer having to download the 10GB text/clip model the original UltraPixel code was/has been (ie the 'downloading shards' you all have seen and had to wait upon), among other features. While of course retaining the ability to work with 10GB/12GB/16GB GPUs, etc.

Hence, the wandb won't be a problem either once the rewritten version it done :)

wfjsw commented 3 months ago

I was thinking about reducing the scope of this mitigation, but the original error report was purged from the stash and I can't find a more recent one.

A patch was shipped with Launcher version 2.8.5 Build 347 that temporarily disabled this mitigation, until I get more information to refine it. As a result, you should no longer experience this error.