comfyui
/comfyui
Expert ComfyUI node-based generative AI assistance covering Stable Diffusion, Flux, controlnets, LoRAs, and API automation. Use when building modular visual generation workflows or automating image/video pipelines.
- Author
- G1Joshi ↗
- Repository
- Agent-Skills ↗
- Licence
- MIT
- Last repository change
- 01.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 4
No signals detected. Repository changed on 01.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Expert ComfyUI node-based generative AI assistance covering Stable Diffusion, Flux, controlnets, LoRAs, and API automation. Use when building modular visual generation workflows or automating image/video pipelines.
Original author description
Expert ComfyUI node-based generative AI assistance covering Stable Diffusion, Flux, controlnets, LoRAs, and API automation. Use when building modular visual generation workflows or automating image/video pipelines.
How it works
- When to Use
- Quick Start
- Core Concepts
- Common Patterns
- Best Practices
- Troubleshooting
- References
SKILL.md preview
---
name: comfyui
description: Expert ComfyUI node-based generative AI assistance covering Stable Diffusion, Flux, controlnets, LoRAs, and API automation. Use when building modular visual generation workflows or automating image/video pipelines.
---
# ComfyUI
ComfyUI is a modular, node-based graph execution engine and GUI for Stable Diffusion and generative AI pipelines, offering granular control over every step of diffusion workflows.
## When to Use
- **Advanced Generative Image & Video Pipelines**: Designing node-based workflows for SDXL, Flux.1, and SD3.
- **Modular LoRA & ControlNet Composition**: Layering multi-ControlNet conditions, IP-Adapter, and inpainting nodes.
- **Automated Headless Generation**: Exporting workflow JSONs and executing generation via the ComfyUI REST API / WebSockets.
- **Custom Node Development**: Extending PyTorch pipelines with proprietary filters, conditioning, and model loaders.
## Quick Start
```bash
# Clone and install ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
pip install -r requirements.txt
# Run server with GPU acceleration
python main.py --listen 127.0.0.1 --port 8188
```
## Core Concepts
### ComfyUI API Execution via Python
Triggering generation workflows programmatically via the REST API:
```python
import json
import urllib.request
import urllib.parse
def queue_prompt(prompt_workflow: dict, server_address="127.0.0.1:8188") -> str:
p = {"prompt": prompt_workflow}
data = json.dumps(p).encode('utf-8')
req = urllib.request.Request(f"http://{server_address}/prompt", data=data)
req.add_header('Content-Type', 'application/json')
with urllib.request.urlopen(req) as response:
res = json.loads(response.read())
return res['prompt_id']
# Minimal workflow dictionary structure
workflow_example = {
"3": {
"class_type": "KSampler",
"inputs": {
"seed": 42,
"steps": 25,
"cfg": 7.0,
"sampler_name": "euler_ancestral",
"scheduler": "normal",
"denoise": 1.0,
"model": ["4", 0],
"positive": ["6", 0],
"negative": ["7", 0],
"latent_image": ["5", 0]
}
}
}
```
### Developing Custom ComfyUI Extension Nodes
Creating a Python custom node module:
```python
import torch
class ImageBrightnessAdjustNode:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"image": ("IMAGE",),
"factor": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 3.0, "step": 0.05}),
}
}
RETURN_TYPES = ("IMAGE",)
FUNCTION = "adjust_brightness"
CATEGORY = "ImageProcessing/Color"
def adjust_brightness(self, image: torch.Tensor, factor: float):
# image is a Tensor [batch, height, width, channels] in [0, 1]
adjusted = torch.clamp(image * factor, 0.0, 1.0)
return (adjusted,)
NODE_CLASS_MAPPINGS = {
"ImageBrightnessAdjust": ImageBrightnessAdjustNode
}
NODE_DISPLAY_NAME_MAPPINGS = {
"ImageBrightnessAdjust": "Adjust Image Brightness"
}
```
### Model Checkpoint & LoRA Weight Stacking
Combining base models with style and character LoRAs:
```text
[Load Checkpoint: flux1-dev.sft]
│ (MODEL, CLIP, VAE)
▼
[LoraLoader: style_hyperrealism.safetensors (0.75)]
│ (MODEL, CLIP)
▼
[CLIPTextEncode (Positive Prompt: "cinematic product shot, studio lighting")]
│ (CONDITIONING)
▼
[KSampler] ──► [VAEDecode] ──► [SaveImage]
```
## Common Patterns
### Headless API Workflow Execution via WebSocket
**Problem**: Executing ComfyUI graph generation workflows programmatically from a backend service.
**Solution**:
POST workflow JSON to the `/prompt` endpoint and monitor generation:
```python
import json
import urllib.request
def queue_prompt(prompt_workflow: dict):
p = {"prompt": prompt_workflow}
data = json.dumps(p).encode('utf-8')
req = urllib.request.Request("http://127.0.0.1:8188/prompt", data=data)
with urllib.request.urlopen(req) as response:
return json.loads(response.read())
# prompt_workflow is exported from ComfyUI as 'Save (API Format)'
```
## Best Practices
**Do**:
- Save workflows as API-format JSON (`Save (API Format)`) when building automated backend pipelines.
- Use `torch.cuda.empty_cache()` inside custom nodes processing large latent batches.
- Store model weights (`.safetensors`) on high-speed NVMe drives to minimize checkpoint switching latency.
- Utilize fp8 / nf4 quantized weights for Flux.1 and SD3 when running on consumer GPUs (16GB VRAM or less).
**Don't**:
- Use untrusted third-party custom nodes without reviewing their Python scripts for arbitrary remote execution.
- Bake text watermarks into prompts; use negative embeddings and ControlNet masks.
- Execute long render batches synchronously in UI processes; decouple generation with Redis queues.
## Troubleshooting
| Error | Cause | Solution |
| :------------------------------------------------ | :------------------------------------------------------ | :------------------------------------------------------------ |
| `Torch CUDA out of memory` | Model checkpoint or latent dimension exceeds GPU VRAM. | Run ComfyUI with `--lowvram` or `--medvram` flag. |
| `Node not found in graph` | Custom node extension not installed in `custom_nodes/`. | Install missing custom node pack via ComfyUI Manager. |
| `Checkpoint file missing from models/checkpoints` | Model weights file not placed in models directory. | Move `.safetensors` model weights into `models/checkpoints/`. |
## References
- [ComfyUI GitHub](https://github.com/comfyanonymous/ComfyUI)
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · G1Joshi/Agent-Skills | 100 | MIT |
| mrsandipmandal/CineForge | 100 | Apache-2.0 |
| TerminalSkills/skills | 100 | Apache-2.0 |
| dreamlab-ai/agentbox | 100 | AGPL-3.0 |
| calesthio/OpenMontage | 100 | AGPL-3.0 |
| Zulgo/video-generation-automation | 100 | AGPL-3.0 |
| SlavaSexton/ComfyUI-Agent-Kit | 95 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version 87aab75039cf (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100stable-diffusion
Expert Stable Diffusion assistance covering SDXL, SD 1.5, Diffusers library, ControlNet, LoRAs, and prompt weighting. Use when building open-source text-to-image and image-to-image AI pipelines. - 100diffusion-models-stable-diffusion-flux
Use this skill when generating and editing images using text-to-image latent diffusion models, negative prompts, and ControlNet. - 100automatic1111
AUTOMATIC1111 Stable Diffusion WebUI is a self-hosted browser interface and REST API for generating images with Stable Diffusion models on your own GPU. Use this skill to install and launch it, call /sdapi/v1/txt2img and img2img from scripts, inpaint, apply LoRAs, add extensions… - 100comfyui-workflow-helper
Build and tune ComfyUI workflows: node graphs, model loaders, samplers and schedulers, conditioning, and ControlNet. Use when creating or debugging a ComfyUI workflow, configuring nodes, installing checkpoints or LoRAs, or optimizing VRAM and generation speed. - 100civitai-mcp-ultimate
Ultimate MCP server for Civitai — search models, browse top images with prompts, download LoRAs/Checkpoints, analyze trends. Use when user asks about AI models, LoRAs, checkpoints, Stable Diffusion, Flux, image generation prompts, or Civitai. - 100cloudgpu-comfyui-images
Rent a GPU to generate images with ComfyUI and an open image model such as FLUX, then retrieve images and workflow metadata. Use when a user-provided image workflow needs more GPU memory or CUDA than the local machine.