jtydhr88 / ComfyUI-LayerDivider

ComfyUI LayerDivider is custom nodes that generating layered psd files inside ComfyUI
59 stars 8 forks source link

Making this work in Linux. #13

Closed TijuanaKez closed 2 months ago

TijuanaKez commented 3 months ago

Love the Layer Divider, loath Windows.

Would love to make the node work on my Ubuntu machine I have setup specifically for AI tasks. Trying to work out how to make it work without using the included .bat files.

Does absolutely require Python 3.11? Looking at your readme and the bat files it seems it want to create it's own python environment and install python 3.11 there, but I dont see how that can work as ComfyUI parent folder already has it's own pyenv with Python 3.10 installed and this environment has to activated to run ComfyUI. All the other custom nodes use this environment.

Can you give a bit more explanation?

Thanks.

jtydhr88 commented 3 months ago

hi, First, I don't think it depends on Python 3.11 only . However I choose Python 3.11 because the release ComfyUI embedded Python 3.11 as default, see from release page https://github.com/comfyanonymous/ComfyUI/releases, and I only work it out on this version of ComfyUI,

However, since this repo depends on some speical packages, such as pytoshop, if we want to make this repo on other envs matrix, for example, py311-linux, py310-linux and py310-win, we need to make this dependency packages have correct version for them.

Regarding to pytoshop, it only has py310-win provided officially, so I built py311-win by my self, and provided in https://github.com/jtydhr88/ComfyUI-LayerDivider/tree/master/_Pre_Builds/_Wheels_win_py311_cu121.

Since I don't have Linux locally, I am not sure it has compatibility to py310-linux or py311-linux.

TijuanaKez commented 3 months ago

Thanks for the quick reply. Ok that looks like a specific windows build. Cloning the ComfyUI repo and installing requirements etc gave me Python 3.10.12 inside its venv. I'm ahead of recommended CUDA as it worked better for some things, and therefore torch, | NVIDIA-SMI 550.90.07 Driver Version: 550.90.07 CUDA Version: 12.4
Torch Version: 2.4.0.dev20240526+cu124

Everything else works great though and very fast on 3090.

I'm happy to compile pytoshop etc if needed.

I'm fairly new to python so I hit a brick wall here. I get ''Miss dependencies' due to NODE_CLASS_MAPPINGS But I dont really know how to determine which particularly dependencies would cause it to fail.

NODE_CLASS_MAPPINGS = {
    "LayerDivider - Color Base": LayerDividerColorBase,
    "LayerDivider - Load SAM Mask Generator": LayerDividerLoadMaskGenerator,
    "LayerDivider - Segment Mask": LayerDividerSegmentMask,
    "LayerDivider - Divide Layer": LayerDividerDivideLayer
}

Thanks.

jtydhr88 commented 3 months ago

I think the issue is https://github.com/jtydhr88/ComfyUI-LayerDivider/issues/1 which I might need to setup a local Linux to investigate it...

jtydhr88 commented 3 months ago

image just make it working on Linux, the code is ok, but require some setting up, I will update doc soon

jtydhr88 commented 2 months ago

I update the readme, and to run this repo in Linux, the key steps:

Close this issue