Cool model! ComfyUI support?

#2
by martintomov - opened

Is anyone already working on custom comfy nodes for finegrain?

Finegrain org

Hey @martintomov ! Yes, we just released some initial ComfyUI nodes - you will find all the details here. tl;dr: we leverage the Comfy Registry and you can install the nodes via:

comfy node registry-install comfyui-refiners

Let us know if you have any questions!

thank you!

I've copied the "refiners_1.0.3" folder into my custom_nodes folder but the nodes in the provided example workflow are still missing.
image.png

I've copied the "refiners_1.0.3" folder into my custom_nodes folder but the nodes in the provided example workflow are still missing.

@paulerbear this is (most probably) because refiners is missing (I guess you have something like ModuleNotFoundError: No module named 'refiners in your ComfyUI nodes at startup).

In your current environment, you could:

1/ Install it via pip install git+https://github.com/finegrain-ai/refiners.git
2/ Or (better) use the brand new registry system and install these nodes via comfy node registry-install comfyui-refiners

I have refiners installed :(

image.png

thanks guys, i've grown used to using comfyui manager and so transitioning to this new registry system is challenging but i will give it a try.

EDIT: setting up the registry is a nightmare guys - why is this so difficult

Finegrain org

Hi @paulerbear !
Do you have the set of commands you used to install the nodes ?

If you installed the nodes "manually" (i.e. you downloaded the zip archive from the registry and extracted the files to you custom_nodes folder), you may have forgotten to install the required dependencies (probably because I forgot to put this in the instructions on how to do it in https://github.com/finegrain-ai/refiners/tree/main/src/comfyui-refiners, my bad let me fix that)

When starting comfyui, you probably see an error message that looks like:

Cannot import /home/laurent/github.com/comfyanonymous/ComfyUI/custom_nodes/comfyui-refiners module for custom nodes: No module named 'refiners'

You can fix this by installing (with pip) the dependencies listed inside the custom_nodes/refiners_1.0.3/requirements.txt file.

I have tested the following instructions to work (on ubuntu):

# download and setup comfyui
git clone [email protected]:comfyanonymous/ComfyUI.git
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

# to install the nodes you can either:
# 1. use comfy-cli
# 2. do it manually

# 1. easy installation with comfy-cli
pip install comfy-cli # install comfy-cli
comfy node registry-install comfyui-refiners # will automatically download the nodes and install the dependencies

# 2. manual installation of the nodes
wget -O comfyui-refiners.zip https://storage.googleapis.com/comfy-registry/finegrain/comfyui-refiners/1.0.3/node.tar.gz # download the nodes
unzip -d custom_nodes/comfyui-refiners comfyui-refiners.zip # extract the nodes into the custom_nodes folder 
pip install -r custom_nodes/comfyui-refiners/requirements.txt # install the dependencies required by the nodes
rm comfyui-refiners.zip # cleanup

# start the comfyui server
python main.py --gpu-only

C:\Users\pauli>pip install comfy-cli
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: comfy-cli in c:\users\pauli\appdata\roaming\python\python310\site-packages (1.2.3)
Requirement already satisfied: charset-normalizer>=3.0.0 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (3.3.2)
Requirement already satisfied: GitPython in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (3.1.43)
Requirement already satisfied: httpx in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (0.27.2)
Requirement already satisfied: mixpanel in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (4.10.1)
Requirement already satisfied: packaging in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (24.1)
Requirement already satisfied: pathspec in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (0.12.1)
Requirement already satisfied: psutil in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (6.0.0)
Requirement already satisfied: pyyaml in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (6.0.1)
Requirement already satisfied: questionary in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (2.0.1)
Requirement already satisfied: requests in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (2.32.3)
Requirement already satisfied: rich in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (13.7.1)
Requirement already satisfied: tomlkit in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (0.13.2)
Requirement already satisfied: typer>=0.9.0 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (0.12.5)
Requirement already satisfied: typing-extensions>=4.7.0 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (4.12.2)
Requirement already satisfied: uv in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (0.4.12)
Requirement already satisfied: websocket-client in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (1.8.0)
Requirement already satisfied: semver=3.0.2 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from comfy-cli) (3.0.2)
Requirement already satisfied: click>=8.0.0 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from typer>=0.9.0->comfy-cli) (8.1.7)
Requirement already satisfied: shellingham>=1.3.0 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from typer>=0.9.0->comfy-cli) (1.5.4)
Requirement already satisfied: markdown-it-py>=2.2.0 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from rich->comfy-cli) (3.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from rich->comfy-cli) (2.18.0)
Requirement already satisfied: gitdb<5,>=4.0.1 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from GitPython->comfy-cli) (4.0.11)
Requirement already satisfied: anyio in c:\users\pauli\appdata\roaming\python\python310\site-packages (from httpx->comfy-cli) (4.5.0)
Requirement already satisfied: certifi in c:\users\pauli\appdata\roaming\python\python310\site-packages (from httpx->comfy-cli) (2024.6.2)
Requirement already satisfied: httpcore==1.* in c:\users\pauli\appdata\roaming\python\python310\site-packages (from httpx->comfy-cli) (1.0.5)
Requirement already satisfied: idna in c:\users\pauli\appdata\roaming\python\python310\site-packages (from httpx->comfy-cli) (3.7)
Requirement already satisfied: sniffio in c:\users\pauli\appdata\roaming\python\python310\site-packages (from httpx->comfy-cli) (1.3.1)
Requirement already satisfied: h11<0.15,>=0.13 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from httpcore==1.*->httpx->comfy-cli) (0.14.0)
Requirement already satisfied: six>=1.9.0 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from mixpanel->comfy-cli) (1.16.0)
Requirement already satisfied: urllib3 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from mixpanel->comfy-cli) (2.2.2)
Requirement already satisfied: prompt_toolkit<=3.0.36,>=2.0 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from questionary->comfy-cli) (3.0.36)
Requirement already satisfied: colorama in c:\users\pauli\appdata\roaming\python\python310\site-packages (from click>=8.0.0->typer>=0.9.0->comfy-cli) (0.4.6)
Requirement already satisfied: smmap<6,>=3.0.1 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from gitdb<5,>=4.0.1->GitPython->comfy-cli) (5.0.1)
Requirement already satisfied: mdurl
=0.1 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from markdown-it-py>=2.2.0->rich->comfy-cli) (0.1.2)
Requirement already satisfied: wcwidth in c:\users\pauli\appdata\roaming\python\python310\site-packages (from prompt_toolkit<=3.0.36,>=2.0->questionary->comfy-cli) (0.2.13)
Requirement already satisfied: exceptiongroup>=1.0.2 in c:\users\pauli\appdata\roaming\python\python310\site-packages (from anyio->httpx->comfy-cli) (1.2.2)

[notice] A new release of pip is available: 24.1 -> 24.2
[notice] To update, run: python.exe -m pip install --upgrade pip

C:\Users\pauli>comfy node registry-install comfyui-refiners
'comfy' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\pauli>

GPT-01-preview provided the following steps:
It looks like the 'comfy' command is not recognized in your system, which is why you're seeing the error:

kotlin
Copy code
'comfy' is not recognized as an internal or external command,
operable program or batch file.
This issue often occurs on Windows when Python scripts installed via pip are not in your system's PATH environment variable. Since you did a user-level installation (as indicated by Defaulting to user installation because normal site-packages is not writeable), the comfy executable is likely installed in a directory that's not included in your PATH.

Here's how you can resolve this:

Step 1: Locate the Scripts Directory
The comfy command-line tool is installed in your user-specific Python Scripts directory. The typical location is:

makefile
Copy code
C:\Users<YourUsername>\AppData\Roaming\Python\Python310\Scripts
Replace with your actual Windows username, and adjust Python310 if you're using a different Python version.

Step 2: Add the Scripts Directory to Your System PATH
To make the comfy command accessible from any command prompt, you'll need to add the Scripts directory to your system's PATH environment variable:

Open Environment Variables Settings:

Press Win + R, type sysdm.cpl, and press Enter.
In the System Properties window, go to the Advanced tab.
Click on Environment Variables at the bottom.
Edit the PATH Variable:

Under User variables (or System variables if you prefer), find the Path variable and select it.
Click Edit.
Add New Path:

Click New and add the path to your Scripts directory, for example:
makefile
Copy code
C:\Users\pauli\AppData\Roaming\Python\Python310\Scripts
Click OK to close each dialog box.
Step 3: Restart Command Prompt
Close any open Command Prompt or PowerShell windows and open a new one to ensure the updated PATH is loaded.

Step 4: Verify the Installation
To confirm that the comfy command is now recognized, run:

cmd
Copy code
comfy --version
You should see the version information for comfy-cli.

Step 5: Install the ComfyUI Nodes
Now you can run the command to install the nodes:

cmd
Copy code
comfy node registry-install comfyui-refiners
This command should download and install the comfyui-refiners nodes along with any required dependencies.

Alternative Solution
If you prefer not to modify your PATH, you can directly invoke the comfy script using its full path:

cmd
Copy code
"C:\Users\pauli\AppData\Roaming\Python\Python310\Scripts\comfy" node registry-install comfyui-refiners
Additional Tips
Ensure Python and Pip Are Updated: It's a good idea to update Python and pip to their latest versions.

Check for Multiple Python Installations: If you have multiple versions of Python installed, make sure you're using the correct one by specifying the full path to python.exe when installing packages or running scripts.

Troubleshooting
Command Still Not Recognized: If the comfy command is still not recognized after updating the PATH, double-check that the Scripts directory is correct and that comfy.exe exists in that folder.

Permission Issues: Run the Command Prompt as an administrator if you encounter permission errors.

I have successfully installed Comfy-CLI and installed refiners using the comfy command per your instructions
image.png
the missing nodes error persists

image.png

I've troubleshooted for around 4 hours with GPT-4o1 and I've managed to brick my comfyui installation. Going to give up on finegrain

Sign up or log in to comment