Learn how to integrate this advanced AI model into your ComfyUI workflows. Automate image layer decomposition with our custom nodes and templates.
Getting started with our custom layer extraction node in ComfyUI requires a few simple steps. Since the model runs on fal.ai cloud servers, no local GPU is needed.
You will need a fal.ai API key to launch the layer generation process. Sign up at fal.ai and copy your API key from the dashboard.
If you have not already, install ComfyUI following their official documentation. Make sure it is running correctly before adding our custom node.
# Clone ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
# Install dependencies
pip install -r requirements.txt
Create a new Python file in your ComfyUI custom nodes directory. The node connects to fal.ai API for optimal model inference.
File location: ComfyUI/custom_nodes/fal_qwen_image_layered.py
After installing the custom node, restart ComfyUI and you should see the new functionality in the image/analysis category.
Once the custom node is installed and ComfyUI is restarted, you are ready to process multi-layered images in your workflows.
Here is the recommended workflow structure for using this advanced segmentation node in ComfyUI.
Use the standard Load Image node to import your source image into the workflow.
Connect your image to the layer parsing node and configure parameters like number of layers, guidance scale, and inference steps.
Add Preview Image nodes for each output layer, and Save Image nodes for export.
Copy this JSON template and import it into ComfyUI to get started quickly:
Complete reference for all parameters available in the AI layer extraction ComfyUI node.
| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
| num_layers | INT | 4 | 1 - 20 | layers to extract from the image |
| guidance_scale | FLOAT | 5.0 | 1.0 - 20.0 | Higher values = more adherence to prompt |
| inference_steps | INT | 28 | 10 - 100 | More steps = higher quality, slower processing |
| seed | INT | 42 | Any | Random seed for reproducibility (-1 = random) |
| prompt | STRING | empty | - | Optional prompt to guide layer extraction |
| negative_prompt | STRING | empty | - | Elements to avoid in layer extraction |
| acceleration | STRING | regular | regular / fast | Use fast for quicker results |
| enable_safety_checker | BOOLEAN | true | true / false | Enable content safety filtering |
The AI layer extraction model supports LoRA (Low-Rank Adaptation) models for custom style fine-tuning. This allows you to apply specific artistic styles to your layer decomposition.
To use a LoRA model, provide the model URL in the lora_model_url parameter. You can adjust the effect strength using lora_strength.
Make sure your fal.ai API key is valid and has sufficient credits. Check that:
If layer quality is not satisfactory, try these adjustments:
To speed up processing:
If LoRA models are not applying correctly: