https://github.com/finegrain-ai/comfyui-finegrain
ComfyUI custom nodes to interact with the Finegrain API
https://github.com/finegrain-ai/comfyui-finegrain
comfyui finegrain python
Last synced: 3 months ago
JSON representation
ComfyUI custom nodes to interact with the Finegrain API
- Host: GitHub
- URL: https://github.com/finegrain-ai/comfyui-finegrain
- Owner: finegrain-ai
- License: mit
- Created: 2025-02-27T12:53:09.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-10T13:07:51.000Z (3 months ago)
- Last Synced: 2025-03-10T14:23:35.898Z (3 months ago)
- Topics: comfyui, finegrain, python
- Language: Python
- Homepage: https://finegrain.ai/
- Size: 583 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-comfyui - **comfyui-finegrain**
README
# comfyui-finegrain
[Finegrain API](https://api.finegrain.ai/doc/) ComfyUI custom nodes.
## Account creation (Prerequisite)
To use these custom nodes, you need Finegrain API credentials:
1. Sign up for an account at https://editor.finegrain.ai/signup:

2. Use your **username** (email) and **password** in the `Finegrain API` node:

> [!Note]
> Behind the scenes, authentication is handled by the [Finegrain Python client](https://github.com/finegrain-ai/finegrain-python/),
> so you don't need to manage [API tokens](https://api.finegrain.ai/doc/authentication/) manually.## Installation
Installing the nodes is pretty straight forward, check out our [Discord server](https://discord.gg/a4w4jXJ6) if you need help.
### Requirements
1. Ensure you have **[Python](https://www.python.org/) 3.12** (or later) installed.
2. Ensure you have [Git](https://git-scm.com/) installed.
### ComfyUI Manager installation (recommended)
1. Ensure you have [ComfyUI Manager](https://github.com/ltdrdata/ComfyUI-Manager?tab=readme-ov-file#comfyui-manager) installed.
2. In ComfyUI, open the manager by clicking the `Manager` button in the top right corner.
3. Click `Custom Nodes Manager` in the menu.
4. Search for `comfyui-finegrain` in the search bar and click the `Install` button.
Alternatively, if you load one of the [workflows](#workflow-examples) below, you should be able to install the nodes directly
by clicking the `Install Missing Custom Nodes` button in the Manager's menu.### Comfy Registry installation
The nodes are published at https://registry.comfy.org/publishers/finegrain/nodes/comfyui-finegrain.
1. Ensure you have [Comfy CLI](https://docs.comfy.org/comfy-cli/getting-started) installed.
2. Install the custom nodes using Comfy CLI:
```bash
comfy node registry-install comfyui-finegrain
```The above command should automatically install the nodes' requirements.
If it somehow doesn't, you can manually install them with:On Linux:
```bash
# ensure you activated the python virtual environment used by ComfyUI
pip install -r custom_nodes/comfyui-finegrain/requirements.txt
```On Windows:
```shell
.\python_embeded\Scripts\pip.exe install hatchling
.\python_embeded\Scripts\pip.exe install -r .\ComfyUI\custom_nodes\comfyui-finegrain\requirements.txt
```### Manual installation
The nodes are published at https://registry.comfy.org/publishers/finegrain/nodes/comfyui-finegrain.
1. Clone the repository:
```bash
cd custom_nodes
git clone https://github.com/finegrain-ai/comfyui-finegrain.git
```2. Install the nodes' requirements:
On Linux:
```bash
# ensure you activated the python virtual environment used by ComfyUI
pip install -r custom_nodes/comfyui-finegrain/requirements.txt
```On Windows:
```shell
.\python_embeded\Scripts\pip.exe install hatchling
.\python_embeded\Scripts\pip.exe install -r .\ComfyUI\custom_nodes\comfyui-finegrain\requirements.txt
```## Workflow examples
> [!Note]
> All the below workflow examples were made using comfyui-finegrain v1.0.0.All our workflows are also available on OpenArt: https://openart.ai/workflows/profile/finegrain
### Prompt to erase
Instantly remove any object, along with its shadows and reflections, just by naming it.

[Download the Prompt to erase workflow](assets/workflows/erase.json)
### Prompt to cutout
Instantly isolate any object in a photo into a perfect cutout, just by naming it.

[Download the Prompt to cutout workflow](assets/workflows/cutout.json)
### Prompt to recolor
Instantly change the color of any object in a photo, even through occlusions, just by naming it.

[Download the Prompt to recolor workflow](assets/workflows/recolor.json)
### Swap
Replace any object in a photo with another, recreating shadows and reflections so naturally it looks like the new object was always there — perfectly preserved in every detail.

[Download the Swap workflow](assets/workflows/swap.json)
### Blend
Seamlessly integrate any object into a scene, recreating shadows and reflections for a result so natural it looks like it was always there — perfectly preserved in every detail.

[Download the Blend workflow](assets/workflows/blend.json)
### Generate packshot
Generate Packshot – Transform any mundane photo into a stunning white-background image with a perfectly natural shadow.

[Download the Generate packshot workflow](assets/workflows/packshot.json)
### Remove background
Remove Background – Our pixel-perfect, high-resolution take on a classic, effortlessly extracting the main object from its background.

[Download the Remove background workflow](assets/workflows/removebg.json)