Extensions/ERPK Collection
ComfyUI Extension

ERPK Collection

A monorepo for ERPK's custom ComfyUI nodes, extending ComfyUI's functionality through integrations with various AI services and APIs.

By eRepublik-Labs·Created 11 months ago·Updated 18 days ago· 1
eRepublik-Labs/comfyui-nodes-erpk
Nodes99
On cloudLocal install
CategoryERPK/Claude, ERPK/Claude/Tools
Stars1
Updated18 days ago

Nodes (99)

Claude API Client

Where the model and key live

ERPK/Claude
Claude Conversation

Actually chat with Claude inside ComfyUI, and keep the thread

ERPK/Claude
Claude Conversation Info

Tokens, history, state

ERPK/Claude
Claude Prompt Enhancer

Turn 'a cat' into a shootable scene

ERPK/Claude
Claude Structured Output

Get valid JSON out of Claude, every time

ERPK/Claude/Tools
Claude Text Generation

The plainest way to put an LLM in your graph

ERPK/Claude
Claude Token Counter

Know what a call costs before you make it

ERPK/Claude
Claude Tool Definition

Hand Claude a schema without writing one

ERPK/Claude/Tools
Claude Usage Stats

See exactly what Claude cost you, down to the cent

ERPK/Claude
Claude Vision Analysis

Up to 20 images, one sharp pair of eyes

ERPK/Claude
Bytedance Dreamina Edit

Edit an image with a prompt, no mask painting

ERPK/WaveSpeedAI
Bytedance Dreamina Text-to-Image

Cloud t2i that speaks text well

ERPK/WaveSpeedAI
Concatenate Strings (ERPK)

Glue your text nodes together

ERPK/utils
Preview Anything

One node to actually see what your graph made

ERPK/utils
Seed

One seed to rule them all, with clamping

ERPK/utils
Gemini API Config

The key plumber for every Gemini node

ERPK/Gemini
Gemini Chat

Talk to Gemini and get text you can actually wire into your graph

ERPK/Gemini
Gemini Detect

Object detection that names what it finds

ERPK/Gemini
Gemini Image Edit

Edit an image by describing the change — no inpainting mask math

ERPK/Gemini
Gemini Image Generation

Nano Banana power, right in ComfyUI

ERPK/Gemini
Gemini Omni Video Generation

The API video node that doesn't poll for half an hour

ERPK/Gemini
Gemini Safety Settings

The content-filter dial for your calls

ERPK/Gemini
Gemini System Instruction

Set the rules once, apply to everything

ERPK/Gemini
Gemini Text Generation

The workhorse LLM node of the pack

ERPK/Gemini
Gemini Vision

Ask questions about an image, get answers back

ERPK/Gemini
Grok API Client

Hand out an API client

ERPK/Grok
Grok Chat

A real multi-turn conversation inside your graph

ERPK/Grok
Grok Image Edit

Sentence-driven edits on up to three source images

ERPK/Grok
Grok Image Generation

Grok images without leaving ComfyUI — and n up to 4 costs the same

ERPK/Grok
Grok Reference to Video

Up to 3 images become a motion clip

ERPK/Grok/Video
Grok Text Generation

Drop an LLM into the middle of your ComfyUI graph

ERPK/Grok
Grok Text to Video

A 15-second Grok video from ComfyUI, with zero VRAM spent

ERPK/Grok/Video
Grok Video Edit

Edit an existing video by describing the change

ERPK/Grok/Video
Grok Video Extend

Keep the clip going past its natural ending

ERPK/Grok/Video
JibMix Qwen Image

A portrait-focused Qwen render, same $0.02 price

ERPK/WaveSpeedAI
Kling Elements

Lock a character across scenes before you animate

ERPK/WaveSpeedAI
Kling O3 Image-to-Video

Start frame, end frame, and sound

ERPK/WaveSpeedAI
Kling O3 Text-to-Video

Turn a prompt into a billed clip, no GPU required

ERPK/WaveSpeedAI
Kling 2.5 Turbo Image-to-Video

The fast, cheap way to animate a frame

ERPK/WaveSpeedAI
Kling 2.5 Turbo Text-to-Video

The Pro-only budget path from prompt to clip

ERPK/WaveSpeedAI
Kling 2.6 Image-to-Video

Sound is on by default, and that doubles the bill

ERPK/WaveSpeedAI
Kling 2.6 Text-to-Video

The budget Kling tier with optional audio

ERPK/WaveSpeedAI
Kling 3.0 Image-to-Video

Animate a still into a scene

ERPK/WaveSpeedAI
Kling 3.0 Text-to-Video

The flagship Kling node, in your graph

ERPK/WaveSpeedAI
WaveSpeed LTX 2.3 Image-to-Video

The sibling with a real seed and longer clips

ERPK/WaveSpeedAI
WaveSpeed LTX 2.3 Text-to-Video

The one LTX node with a real seed

ERPK/WaveSpeedAI
Lightricks LTX 2 Pro Image-to-Video

Short clips with sound, billed through WaveSpeed

ERPK/WaveSpeedAI
Lightricks LTX 2 Pro Text-to-Video

6/8/10 seconds, sound on, billed per clip

ERPK/WaveSpeedAI
MiniMax H3 Image-to-Video

Animate a frame, or interpolate between two

ERPK/WaveSpeedAI
MiniMax H3 Reference-to-Video

Character lock, with a bracket-tag catch

ERPK/WaveSpeedAI
MiniMax H3 Text-to-Video

Picture and stereo audio in one pass

ERPK/WaveSpeedAI
OpenAI API Config

The one node every ERPK OpenAI workflow starts with

ERPK/OpenAI
OpenAI Chat

Chat with any OpenAI-compatible model and feed the answer back into your graph

ERPK/OpenAI
OpenAI Image Edit

Gpt-image-2 with mask inpainting and continuity

ERPK/OpenAI
OpenAI Image Generation

GPT-Image-2 with transparent backgrounds and a revised prompt

ERPK/OpenAI
OpenAI Image Generation (Responses)

Let a reasoning model do the prompt-drawing

ERPK/OpenAI
OpenAI System Instruction

Set the model's personality once, apply it everywhere

ERPK/OpenAI
OpenAI Text Generation

LLM calls where you actually need reproducibility

ERPK/OpenAI
OpenAI Vision

Make GPT-5.5 look at your images and tell you what it sees

ERPK/OpenAI
WaveSpeed Preview Video

The MiniCPM pack's ghost node (and what replaced it)

ERPK/WaveSpeedAI
Qwen Image 2.0 Edit

The next-gen Qwen editor with Standard and Pro tiers

ERPK/WaveSpeedAI
Qwen Image 2.0 Text-to-Image

The current-gen Qwen, Standard or Pro

ERPK/WaveSpeedAI
Qwen Image Edit LoRA

Edit an image with Qwen — and steer it with up to three LoRAs

ERPK/WaveSpeedAI
Qwen Image Edit

Qwen-Image editing in ComfyUI — but it's an API call, not a local model

ERPK/WaveSpeedAI
Qwen Image Edit Plus LoRA

Cloud editing with your own LoRAs, up to three at once

ERPK/WaveSpeedAI
Qwen Image Edit Plus

The 2511 model for multi-person consistency

ERPK/WaveSpeedAI
Qwen Image Layered

Decompose one image into editable RGBA layers

ERPK/WaveSpeedAI
Qwen Image LoRA

Generate with a trained style, paid per image

ERPK/WaveSpeedAI
Qwen Image Max Edit

Six reference images and one instruction, $0.07 per pass

ERPK/WaveSpeedAI
Qwen Image Max

The premium 20B tier when a $0.02 render isn't enough

ERPK/WaveSpeedAI
Qwen Image Multiple Angles

Orbit your subject with three sliders

ERPK/WaveSpeedAI
Qwen Image Text-to-Image

Bilingual prompting, five-cent images, zero VRAM

ERPK/WaveSpeedAI
Regional Prompt Builder

The ERPK Regional Prompt Builder

ERPK/utils
Region Mask

Pull one region's mask out of the builder's batch

ERPK/utils
Bytedance Seedance 2.0 Image-to-Video

Animate a frame, optionally end on another

ERPK/WaveSpeedAI
Bytedance Seedance 2.0 Text-to-Video

Four model tiers, native audio, up to four references

ERPK/WaveSpeedAI
Bytedance Seedance 2.5 Image-to-Video

4k, native audio, and a price tag to match

ERPK/WaveSpeedAI
Bytedance Seedance 2.5 Text-to-Video

The 4k T2V that takes reference material too

ERPK/WaveSpeedAI
Bytedance Seedance 2.5 Video Edit

Rewrite a clip by prompt, chained off any video node

ERPK/WaveSpeedAI
Bytedance Seedance 2.5 Video Extend

Keep the clip going past its last frame

ERPK/WaveSpeedAI
Bytedance Seedream V4.5 Edit

Cloud image editing that's actually good at text

ERPK/WaveSpeedAI
Bytedance Seedream V4.5 Edit Sequential

One edit prompt, 1 to 15 coherent results

ERPK/WaveSpeedAI
Bytedance Seedream V4.5

The text-and-typography specialist, up to 4K

ERPK/WaveSpeedAI
Bytedance Seedream V4.5 Sequential

One prompt, a batch of consistent images, 15 max

ERPK/WaveSpeedAI
Bytedance Seedream V4 Edit

The workhorse ByteDance edit node

ERPK/WaveSpeedAI
Bytedance Seedream V4 Edit Sequential

Edit up to 10 images, emit a consistent batch

ERPK/WaveSpeedAI
Bytedance Seedream V4

ByteDance's flagship image model, from 320px up to 4K

ERPK/WaveSpeedAI
Bytedance Seedream V4 Sequential

A consistent batch of images from one prompt

ERPK/WaveSpeedAI
Bytedance Seedream V5.0 Lite Edit

High-resolution cloud editing with a 1440px floor

ERPK/WaveSpeedAI
Bytedance Seedream V5.0 Lite Edit Sequential

Edit up to 10 images into one consistent set

ERPK/WaveSpeedAI
Bytedance Seedream V5.0 Lite

ByteDance's image model, billed by the image

ERPK/WaveSpeedAI
Bytedance Seedream V5.0 Lite Sequential

A consistent image batch in one paid call

ERPK/WaveSpeedAI
WaveSpeed Upload Image

The bridge your local images have to cross

ERPK/WaveSpeedAI
Veo Image to Video

Google's best video model, fed from your canvas

ERPK/Gemini/Veo
Veo Text to Video

Run Google's Veo 2 from ComfyUI — no GPU needed, but it'll cost you

ERPK/Gemini/Veo
Alibaba WAN 2.7 Image-to-Video

The API-only sequel to the last open Wan

ERPK/WaveSpeedAI
Alibaba WAN 2.7 Text-to-Video

Alibaba's video model, no weights required

ERPK/WaveSpeedAI
Alibaba WAN 2.7 Video Extend

Extending a clip you already made

ERPK/WaveSpeedAI
WaveSpeed Client

The boring node you can usually skip

ERPK/WaveSpeedAI
Readme

ComfyUI Custom Nodes - ERPK Collection

Publish to Comfy Registry Registry

A monorepo for ERPK's custom ComfyUI nodes, extending ComfyUI's functionality through integrations with various AI services and APIs.

Current Version: 2026.8.4 (CalVer)

Repository Structure

ComfyUI-Custom-Nodes/
├── wavespeed/                     # WaveSpeed AI integration
│   ├── README.md                  # Package documentation
│   ├── nodes.py                   # Core nodes
│   ├── seedream_v4*.py            # Seedream V4 nodes (4 variants)
│   ├── seedream_v4_5*.py          # Seedream V4.5 nodes (4 variants)
│   ├── qwen_image_*.py            # Qwen Image nodes
│   └── wavespeed_api/             # API integration layer
├── claude/                        # Claude API integration
│   ├── README.md                  # Package documentation
│   ├── nodes.py                   # Core nodes
│   ├── prompt_enhancer.py         # Prompt enhancement node
│   ├── vision_analysis.py         # Image analysis node
│   └── claude_api/                # API integration layer
├── gemini/                        # Google Gemini API integration
│   ├── README.md                  # Package documentation
│   ├── nodes.py                   # All Gemini nodes
│   ├── veo_nodes.py               # Veo video generation nodes
│   └── gemini_api/                # API integration layer
├── openai/                        # OpenAI API integration
│   ├── README.md                  # Package documentation
│   ├── nodes.py                   # Core nodes (Config, Text, Vision, Chat)
│   ├── image_nodes.py             # Image generation/editing nodes
│   └── openai_api/                # API integration layer
├── grok/                          # xAI Grok API integration
│   ├── README.md                  # Package documentation
│   ├── nodes.py                   # Config, Text, Chat, Image nodes
│   ├── video_nodes.py             # Text-to-Video, Ref-to-Video, Edit, Extend
│   └── grok_api/                  # API integration layer
├── utils/                         # String and general utilities
│   ├── __init__.py                # Module exports
│   └── concat_strings.py          # String concatenation node
├── settings.py                    # ComfyUI settings reader for API keys
├── shared_workflows.py            # Shared workflows CRUD for multi-user
├── shared_workflows/              # Legacy storage fallback (gitignored)
└── web/                           # Frontend extensions
    ├── erpk_settings.js           # API key settings in ComfyUI Settings UI
    ├── shared_workflows.js        # Browse/save/delete shared workflows UI
    ├── node_migration.js          # V1→V3 node type rewriting for old workflows
    ├── aspect_ratio.js            # Aspect ratio display in node titles
    └── concat_strings.js          # Dynamic UI for concat strings node

Available Node Packages

ERPK/WaveSpeedAI

Custom nodes for WaveSpeed AI's image generation and editing APIs.

Category in ComfyUI: ERPK/WaveSpeedAI

ByteDance Seedream V4 Models

  • Seedream V4 - Text-to-image generation with configurable dimensions (320-4096px)
  • Seedream V4 Sequential - Multi-image generation with cross-image consistency (1-15 images, $0.027/image)
  • Seedream V4 Edit - AI-powered image editing with text prompts (up to 10 reference images)
  • Seedream V4 Edit Sequential - Multi-image editing with coherent results (1-15 images, $0.027/image)

ByteDance Seedream V4.5 Models

  • Seedream V4.5 - Enhanced typography and text rendering for posters, logos, UI (1024-4096px)
  • Seedream V4.5 Sequential - Multi-image generation with typography support (1-15 images, $0.027/image)
  • Seedream V4.5 Edit - Image editing with enhanced text rendering (up to 10 reference images)
  • Seedream V4.5 Edit Sequential - Multi-image editing with typography (1-15 images, $0.027/image)

Qwen Image Models

  • Qwen Image Text-to-Image - Bilingual text-to-image generation (Chinese/English, max 1536×1536, $0.02/image)
  • Qwen Image Edit - Single image editing with bilingual prompts (256-1536px, $0.02/image)
  • Qwen Image Edit Plus - Advanced editing with up to 3 reference images ($0.02/image)
  • Qwen Image 2.0 Text-to-Image - Next-gen Qwen with Standard and Pro quality tiers
  • Qwen Image 2.0 Edit - Next-gen Qwen editing with up to 3 reference images, Standard and Pro tiers

Video Generation

Video nodes return a STRING URL that works directly with the Preview Anything node for preview/download. Polling runs at a 10s interval, timing out after 15 minutes on most video nodes, 20 on MiniMax H3 Reference-to-Video and 30 on the Seedance 2.5 family, which run longest.

  • Bytedance Seedance 2.0 Text-to-Video / Image-to-Video - Native audio-visual generation across four model variants (Seedance 2.0, Turbo, Fast, Fast Turbo). T2V supports reference images/videos/audios; I2V supports optional end frame. Turbo variants are 720p/1080p only.
  • Bytedance Seedance 2.5 Text-to-Video / Image-to-Video - Longer clips (4-30s) and 4k output. T2V offers the Seedance 2.5 and Turbo tiers and supports reference images/videos/audios; I2V adds a Spicy tier and an optional ending frame
  • Bytedance Seedance 2.5 Video Edit / Video Extend - Rewrite an existing clip from a prompt, or continue one past its final frame. Both take the source as a video URL, so they chain off any video node's output
  • MiniMax H3 Text-to-Video / Image-to-Video / Reference-to-Video - Picture and native stereo audio in a single pass at 24fps. Audio is steered by an Audio: line in the prompt rather than a toggle. Reference-to-Video takes up to 9 images, 3 videos and 3 audios, each cited in the prompt by bracket tag
  • Alibaba WAN 2.7 Text-to-Video / Image-to-Video / Video Extend - WAN 2.7 with extension support for continuing existing clips
  • WaveSpeed Veo 3.1 Text-to-Video / Image-to-Video - Google Veo 3.1 via WaveSpeed billing (distinct from the Gemini-direct Veo nodes under ERPK/Gemini/Veo)
  • Kling 3.0 Image-to-Video - Kling v3.0 i2v with Standard and Pro quality tiers
  • Kling O3 Text-to-Video / Image-to-Video - Kling's flagship O3 with Standard and Pro tiers
  • Lightricks LTX 2 Pro Text-to-Video / Image-to-Video - LTX 2 Pro with enum durations (6/8/10s) and optional audio
  • WaveSpeed LTX 2.3 Text-to-Video / Image-to-Video - LTX 2.3 with 480p/720p/1080p resolution, 5-20s duration, and seed control

LTX 2 Pro and LTX 2.3 are separate nodes (not a unified dropdown) because their APIs take different parameters — LTX 2 Pro has generate_audio, LTX 2.3 has resolution/aspect_ratio/seed.

The Kling (2.5 Turbo, 2.6, Elements) and LTX 2 Pro nodes expose a seed widget for cache control. These WaveSpeed endpoints have no API seed, so the value is not sent to the API: leaving it on "randomize" forces a fresh, re-billed generation on every queue, while a fixed value lets ComfyUI serve the cached result and skip the call. LTX 2.3's seed, by contrast, is a true generation seed sent to the API.

Installation & Documentation: See wavespeed/README.md

⚠️ Note: For the official WaveSpeed ComfyUI nodes and documentation, see the official WaveSpeed ComfyUI repository.

ERPK/Claude

Claude API integration for text generation, prompt enhancement, vision analysis, and conversational AI.

Category in ComfyUI: ERPK/Claude

Nodes

  • Claude API Client - Initialize Claude API connection with model selection (Opus 4.7, Sonnet 4.6, Opus 4.6, Haiku 4.5) and configuration. Optional if API key is configured in ComfyUI Settings or config.ini -- Claude nodes can run standalone.
  • Claude Prompt Enhancer - Transform simple prompts into detailed descriptions with 51 artistic styles (photorealistic, cinematic, fantasy, cyberpunk, anime, oil painting, watercolor, and more)
  • Claude Vision Analysis - Analyze images with Claude's multimodal capabilities (up to 20 images simultaneously). Optional per-node model override lets you use Opus 4.7 (2576px image resolution) for vision even when your client is configured with a different model.
  • Claude Text Generation - General-purpose text completion and generation
  • Claude Conversation - Multi-turn dialogues with context preservation and automatic memory management
  • Claude Conversation Info - Display conversation statistics and token usage
  • Claude Tool Definition - Build Anthropic tool definitions for structured output (chainable)
  • Claude Structured Output - Force Claude to respond with structured JSON matching a tool schema
  • Claude Token Counter - Count tokens and estimate API costs before making requests
  • Claude Usage Stats - Track cumulative token usage and costs across all Claude nodes

Key Benefits:

  • 51 artistic styles for prompt enhancement (photorealistic, cinematic, fantasy, anime, oil painting, impressionist, cyberpunk, and more)
  • Claude Opus 4.7 support with adaptive thinking (1M context, automatic sampling-param handling)
  • Prompt caching (up to 90% cost savings)
  • Streaming support for real-time responses
  • Automatic context window management
  • Multi-image analysis capabilities
  • Cost optimization with token counting

Installation & Documentation: See claude/README.md

ERPK/Gemini

Google Gemini API integration for text generation, vision analysis, multi-turn conversations, image generation, image editing, and Veo video generation.

Category in ComfyUI: ERPK/Gemini and ERPK/Gemini/Veo

Nodes

  • Gemini API Config - Initialize Gemini API connection (API key configuration). Optional if API key is configured in ComfyUI Settings or config.ini -- Gemini nodes can run standalone.
  • Gemini Text Generation - General-purpose text generation with model selection (Gemini 3.1 Pro, 3 Pro, 3 Flash, 2.5 Pro, 2.5 Flash, 2.5 Flash-Lite)
  • Gemini Chat - Multi-turn conversations with automatic context preservation
  • Gemini Vision - Analyze images with multimodal capabilities
  • Gemini Detect - Open-vocabulary object detection: name objects (or leave empty to detect everything prominent) and get normalized regions on an ERPK_REGIONS output that wires into the Regional Prompt Builder's regions input
  • Gemini Image Generation - Generate images from text descriptions (3.1 Flash, 3 Pro, 2.5 Flash models; up to 4K resolution, 14 aspect ratios, Google Search grounding)
  • Gemini Image Edit - Edit and modify images with natural language prompts (up to 14 reference images, same model and resolution options)
  • Gemini System Instruction - Set persistent system-level instructions to guide model behavior
  • Gemini Safety Settings - Configure content safety filters (strict/balanced/permissive presets or custom)

Veo Video Generation Nodes

  • Veo Text to Video - Generate videos from text prompts using Google's Veo models (Veo 3 includes synchronized audio)
  • Veo Image to Video - Generate videos from an input image and optional text prompt
  • Gemini Omni Video Generation - Generate 3-10s 720p video from a prompt or start image via Gemini Omni Flash (returns in one call, no polling)

Key Benefits:

  • Support for Gemini 3.1 Pro, 3 Pro, 3 Flash, 3.1 Flash-Lite, and Gemini 2.5 models
  • Thinking level control across all models (none/minimal/low/medium/high) with automatic parameter translation — Gemini 3.x uses thinking_level enum, Gemini 2.5 uses thinking_budget integer behind the same UI
  • Veo video generation with text-to-video and image-to-video (Veo 3 includes audio)
  • Each node selects its own model for maximum flexibility
  • State-of-the-art reasoning with Gemini 3.1 Pro and 2.5 Pro
  • Image generation with Gemini 3.1 Flash (recommended), 3 Pro, and 2.5 Flash models (1K to 4K resolution)
  • Image editing with natural language instructions (up to 14 reference images)
  • Simple, straightforward API integration
  • Vision capabilities with batch image support
  • Flexible safety controls
  • Native multi-turn conversation support

Installation & Documentation: See gemini/README.md

ERPK/OpenAI

OpenAI API integration for text generation, vision analysis, multi-turn conversations, image generation, and image editing.

Category in ComfyUI: ERPK/OpenAI

Nodes

  • OpenAI API Config - Initialize OpenAI API connection (API key configuration). Optional if API key is configured in ComfyUI Settings or config.ini -- OpenAI nodes can run standalone.
  • OpenAI Text Generation - General-purpose text generation with model selection (GPT-5.5, GPT-5.5 Pro, GPT-5.4 family, GPT-5.2, GPT-4o, GPT-4.1, o3, o3-mini, o3-pro, o4-mini) and optional reasoning_effort and verbosity controls
  • OpenAI Chat - Multi-turn conversations with automatic context preservation, plus reasoning_effort and verbosity control on gpt-5.x models
  • OpenAI Vision - Analyze images with GPT-5.5 / GPT-5.4 / GPT-4o vision capabilities
  • OpenAI System Instruction - Set persistent system-level instructions to guide model behavior
  • OpenAI Image Generation - Generate images with GPT-Image-2 (default), GPT-Image-1.5, GPT-Image-1, GPT-Image-1-Mini (DALL-E 3 deprecated 2026-05-12)
  • OpenAI Image Generation (Responses) - Generate images via the Responses API with a mainline reasoning model (gpt-5.5 default) driving the image_generation hosted tool. Adds optional web search grounding and prompt revision.
  • OpenAI Image Edit - Edit and inpaint images with natural language prompts

Key Benefits:

  • Support for latest GPT-5.5 (premium flagship, 1.05M context, $5/$30 per MTok), GPT-5.5 Pro (extended-compute, $30/$180 per MTok, no streaming), GPT-5.4 family (flagship, pro, mini, nano), GPT-5.2, GPT-4.1, GPT-4o, and o-series reasoning models
  • reasoning_effort parameter (none/minimal/low/medium/high/xhigh) for reasoning-capable models; ignored silently by non-reasoning models
  • verbosity parameter (default/low/medium/high) for gpt-5.x models — shapes how chatty the response is independently of max_tokens; silently dropped for older models
  • Image generation with GPT-Image-2 (latest flagship: 4K output, multilingual text, rebuilt architecture), GPT-Image-1.5 (still available, supports transparent background), GPT-Image-1, and GPT-Image-1-Mini (cost tier)
  • DALL-E 3 shuts down 2026-05-12 — migrate to GPT-Image models
  • Image editing with optional mask support for inpainting
  • Multi-turn conversation with session management
  • Automatic retry with exponential backoff
  • JSON response format support

Installation & Documentation: See openai/README.md

ERPK/Grok

xAI Grok integration — text, multi-turn chat, image generation/editing (up to 3 source images), and full video coverage (text-to-video, reference-to-video, edit, extend).

Category in ComfyUI: ERPK/Grok and ERPK/Grok/Video SDK requirement: xai-sdk>=1.14.0

Text & Chat Nodes

  • Grok API Client - Initialize the xAI client (optional for downstream nodes)
  • Grok Text Generation - One-shot text completion via grok-4.5 / grok-4.3 / the grok-4.20 family / grok-build-0.1
  • Grok Chat - Multi-turn conversation threaded via GROK_CHAT_SESSION

Image Nodes

  • Grok Image Generation - Text-to-image, 8 aspect ratios, 1k/2k resolution, n=1..4 batched output
  • Grok Image Edit - Single or multi-image editing (up to 3 source images per xAI's cap)

Video Nodes

  • Grok Text to Video - Text-to-video, 1-15s, 7 aspect ratios, 480p/720p
  • Grok Reference to Video - Up to 3 reference images guide generation; <IMAGE_N> token addressing
  • Grok Video Edit - Edit existing video URL with text prompt (output capped at 720p)
  • Grok Video Extend - Append N more seconds of new content to an existing video URL

Installation & Documentation: See grok/README.md

Background Removal (Removed)

Background removal nodes have been removed from this package. For background removal in ComfyUI, use ComfyUI-RMBG instead.

ERPK/utils

String manipulation and general utility nodes.

Category in ComfyUI: ERPK/utils

Nodes

  • Concatenate Strings - Combine multiple text inputs with configurable delimiters. Supports up to 10 connectable inputs - drag STRING outputs from other nodes or enter text directly.
  • Seed - Generate a seed value with optional min/max range clamping. Connect the output to any node's seed input to share a single seed.
  • Preview Anything - Preview any value: text, markdown, image/video/audio/gif URLs, IMAGE tensors, and AUDIO dicts. Includes a Download button that saves the rendered content to your computer.
  • Regional Prompt Builder - Draw regions on a canvas and emit a layout-aware prompt for any image generation model: each region becomes a verbal placement plus box_2d coordinates (works with the Gemini, OpenAI, and Grok image nodes). Also outputs pixel-space BOUNDING_BOX regions compatible with core SAM3 Detect, Draw BBoxes, and Crop By BBoxes nodes.

Regional Prompt Builder features:

  • Canvas editor on the node: drag to draw, move, and resize regions; shift-click or a shift-drag marquee selects multiple regions and dragging any selected region moves the whole selection; Ctrl/Cmd-drag force-draws over existing boxes; Alt-click cycles through overlapping regions; Delete removes the selection; Ctrl/Cmd+C/V/D copy, paste, and duplicate; H hides the boxes for a clear view of the frame; F (or the ⤢ button) expands the editor to fill the window (Esc exits). An inspector row under the canvas edits the selected region's description, kind (object or rendered text), and literal text live; double-click a region to jump to its description field
  • Exact geometry: right-clicking a region selects it and the region list shows X/Y/W/H fields for it in frame pixels, applied live (right-clicking empty canvas opens just the list); arrow keys nudge the selection by 1px (10px with Shift) and Alt+arrows resize
  • Right-click the canvas for a region list (top = front): click a row to select, drag rows to reorder depth, duplicate or delete per row
  • Regions keep identity colors; text regions preview their literal text in-frame
  • Depth control: regions layer back to front (number 1 is backmost). Reorder with [ / ] or the inspector's depth buttons; the prompt tells the model that later elements appear in front where regions overlap
  • Placement anchoring: hand-drawn additions and model-applied moves are described relative to the nearest grounded objects ("between the hippo and the man", or "in front of the man" when overlapping), because edit models follow landmarks far better than box_2d coordinates - which they treat as a weak hint and override for physical plausibility (a hat boxed in mid-air lands on the ground). Only objects already in the image (scanned or node-composited) anchor a placement; for an object with no support under its box, draw the box on a real surface
  • Deterministic object insertion: wire an object's image into a region's ref socket and set the region to Node - with an image connected, the reference is composited into the scene at the region's box (background auto-keyed, subject fit and centered) so the box is authoritative for placement and the edit model only blends it; set Model (or run with no image) to instead have the edit model reproduce and place the reference itself (coordinate-blind). The only reliable way to place an added object pixel-exact
  • Status strip shows region count, selection, frame dimensions, and aspect ratio
  • A ? button in the status strip toggles a shortcuts cheat sheet over the canvas (Escape or an outside click dismisses it)
  • Clear button in the status strip empties all regions (two-step confirm, no blocking dialog)
  • Optional grid with a typed cell size in frame pixels (8-1024, default 64 - latent-friendly), a color picker plus opacity control, and snap-to-grid; drawing, moving, and resizing quantize to pixel multiples, and the preferences save with the workflow
  • Optional reference image input: the connected image displays under the regions (LoadImage shows immediately) and passes through unchanged on an image output, so the builder sits inline in image-edit chains. When the image's aspect differs from the frame, a ⚠ match chip in the status strip sets width/height to the image with one click
  • Dynamic descriptions: optional desc_1-desc_10 STRING sockets override the matching region's description at execute time (numbered as on the canvas), so any text node can drive a region. Sockets stay hidden until exposed with the inspector's plug button (or already wired); pressing the button again hides an empty socket or disconnects a wired one (unsetting it from the node face); socket labels carry the region's text, and the inspector locks a wired region's description field
  • Per-region reference images: optional ref_1-ref_10 IMAGE sockets attach a reference to the matching region (inspector ▣ button, same flow as descriptions; 10 matches Gemini's high-fidelity object budget). Wired refs flow out on the image_refs output in region order; connect it to Gemini Image Edit's image_refs input and each region's prompt line cites its image number, with the edited image always image 1. Ref-wired regions show a ▣ chip and a corner thumbnail
  • Wired regions: an optional regions input accepts detected regions (e.g. from Gemini Detect) and appends them after the canvas-drawn regions at execute time - the canvas stays untouched, desc_N/ref_N keep binding canvas regions only, and appended regions render in front where they overlap
  • Undo/redo for everything region-shaped (Ctrl/Cmd+Z / Shift+Z): draws, moves, deletes, typing, depth changes, scans, and Clear all each revert as sensible single steps, 50 deep
  • Object scan: with an image connected, a ✦ button in the canvas corner has Gemini detect the scene's objects - each becomes a real editable region with a layer name (the label) and a per-region prompt (a one-sentence caption that feeds generation), depth pre-ranked back-to-front, while SAM computes segmentation masks locally (weights download once). Masks keep their largest blob, fill holes, and feather their edges; small objects are re-segmented from a cropped close-up for full-resolution edges. The scan replaces the canvas as a single undo step. A ⚙ options window picks the Gemini detection model and the segmentation backbone (saved with the workflow): the segmenter list is filtered to the SAM families this install can run (SAM / SAM-HQ / SAM 2.1, = downloads on first use) and defaults to SAM ViT-Base
  • Scan cost readout: each scan estimates its price from the API's reported token usage and shows it in the status strip (last scan plus a running session total) with a toast after the scan finishes; it is a paid-tier estimate (the free tier bills nothing) and reads "n/a" for a model with no price on file
  • Layer groups: Alt-drop a list row to nest regions; parents collapse, group-hide, and move with their children, and section scans group their detections under the scanned region
  • Layer-style region list: right-clicking a region opens a detail view - mask thumbnail, editable name and prompt, exact pixel geometry, per-layer hide/show eye, delete - above the reorderable list, which captions rows by layer name and adds per-row and global hide/show toggles
  • A masks output emits a frame-sized MASK batch (one per region, in region order): scanned regions use their segmentation, hand-drawn regions get filled rectangles - ready for inpainting chains; the Region Mask node picks a single region's mask out of the batch by canvas number
  • Mask-aware selection: hovering the canvas glows the object's mask under the cursor, and clicks pass through the empty corners of scanned regions to whatever is really under the pointer - overlapping objects stay individually clickable
  • Object move/scale: drag a scanned object and its masked cut-out follows live with a dashed ghost at the origin; at execute time the move is composited into the image output and the original location is inpainted away (OpenCV), both deterministically - so a moved object never appears twice - and the prompt asks the edit model only to blend the pasted copy
  • Move behind another object: a node-composited move lands behind any scanned region (static or itself moved) that sits above it in the depth order and overlaps it - the upper object's pixels end up on top (re-stamped for a static occluder, painted last for a moved one), so the move reads as going behind it; the canvas preview shows this same layering for a Node move, pixel-for-pixel against the deterministic image output (a Model move previews the intended result - the object stamped at its destination behind the same occluders, with a from/to crosshair pair and a half-opacity origin checkerboard the object shows through, since the node leaves the original in place for the edit model), and the prompt is framed from the occluder's side ("with the man in front of it, the lemur is partly hidden") to stop the edit model redrawing the covered part. Order the occluder above the moved object in the layer list (it must be a scanned region with a mask; a hand-drawn box is a layout guide, not an occluder). Occlusion is deterministic only in Node mode - a Model-mode move gets the same clause but it is best-effort, because the edit model decides depth and tends to render subjects fully visible
  • Move applied by Node or Model (per-region toggle in the detail panel): Node (default) composites the move into the image pixel-exact and clears the origin, so position is precise and the prompt asks the edit model only to relight, ground with a contact shadow, and match depth of field / grain / ambient color so it doesn't look pasted; Model keeps the object in the image (the node does not clear its origin) and asks the edit model to relocate it from its origin marker (A) to its destination marker (B), erasing the original and rebuilding that spot as background - it stays in context so identity/lighting carry over with no reference crop, but lands only approximately (edit models position by scene semantics and the markers, not by box_2d); this trusts the model to remove the original, so if it leaves a duplicate switch that region to Node for an exact move. To steer Model placement the prompt anchors the destination to the nearest named objects - "between the tiger cub and the man" when they straddle the spot, or "behind the man, in front of the cub" (from the layer order) when it overlaps them, so depth is respected too; for an exact position use Node
  • Placement markers (per-region Marker toggle in the right-click detail panel, on by default, needs a connected image): draws a high-contrast solid dot - a filled colored disc over a dark halo with a label letter (A, B, C…) centered inside - for every element the edit model acts on by reading pixels: an addition gets one dot at its spot ("center it on marker A - the magenta dot"), a Model move gets two (one on the object at its origin, one at its target) cited as "move it from marker A to marker B", and a Model cut-out gets one dot on the object to delete ("the object at marker C … remove it"). This is visual prompting (set-of-mark): an edit model ignores box_2d coordinates but reads pixels, so a bold dot it can see is a far stronger placement cue than coordinates it can't. Each marker carries two independent identifiers - a distinct unnatural color (magenta, cyan, lime, …, skipping any color word already in the description) and a unique letter - so markers can't be confused. The dot sits under where the element should land, so a hit hides it and the prompt asks the model to paint it out (a surviving dot signals the model ignored the spot). Node-composited and inserted regions never get one, and a region's Marker can be switched off individually. It raises the odds, not a guarantee - for position-critical work use Node
  • Cut out (Shift+Delete): removes the selected region and inpaints its masked area from the surrounding pixels (OpenCV) in the image output, and the prompt instructs a downstream edit model to rebuild that area as natural background with no new objects - so the object is removed and the gap filled naturally whether you save the image directly or run it through an edit node (output stays RGB); marked on the canvas with the transparency checkerboard behind the mask; Ctrl/Cmd+Z restores it
  • Removal fill: the removal_fill widget chooses how cleared areas (cut-outs and a moved region's old position) are filled - inpaint (default) rebuilds the background with OpenCV, or chroma lays a flat key color (the chroma_color widget, default chroma green #00B140) so a downstream chroma-key/compositing node can replace it cleanly instead of relying on the inpaint, which can smear on busy scenes; when chroma is active the prompt names the key color so an edit model treats those patches as empty to rebuild
  • The prompt instructs the model to treat placement areas as invisible guides so boxes are not rendered into the image

Concatenate Strings features:

  • 10 connectable text inputs (Text 1 through Text 10)
  • Optional labels for each input (Label 1 through Label 10)
  • Configurable delimiter with escape sequence support (\n, \t)
  • Label placement options (same line or new line)
  • Add/Remove buttons to dynamically manage inputs
  • Visual separators between configuration and input sections

Preview Anything features:

  • Accepts any value via a wildcard input
  • Auto-detects type (image/video/audio by URL extension, markdown by syntax, IMAGE tensor, AUDIO dict)
  • Dark, distraction-free preview surface
  • Collapsible Options panel tucks display_type, filename, and strip_metadata behind a single bar so the node stays clean; click to expand the styled controls
  • Toolbar appears only when there is content — the Download / Copy buttons and character counter stay hidden until a payload is rendered
  • display_type dropdown to force a specific renderer
  • Download button saves content as .txt, .md, or the original media format
  • Copy button in the toolbar: copies text/markdown to clipboard, or copies the current image (single-image and gallery-single views) as a PNG blob
  • Character counter appears in the toolbar for text and markdown output
  • Image dimensions badge (W × H) overlays the bottom-right of single-image previews
  • Text and markdown stay at a fixed scrollable size (no auto-growth to canvas-swallowing heights); images, video, and audio still auto-fit to their aspect ratio
  • Last rendered content persists across workflow reloads
  • Optional strip_metadata toggle re-encodes image URL inputs to remove EXIF / ICC / XMP (GPS, camera info, timestamps) before download. Images only; IMAGE tensor inputs are already metadata-free.

Shared Workflows (Multi-User)

In multi-user ComfyUI (--multi-user), each user's workflows are sandboxed. Shared Workflows provides a common directory where any user can save, browse, load, and delete workflow templates. Also works in single-user mode.

Access: Right-click the canvas > ERPK submenu, or open ERPK Settings to see the inline shared workflows list below your API keys.

  • Browse Shared Workflows... - View all shared workflows with name, size, date, and authorship (created by / last edited by). Load any workflow into your canvas or delete it.
  • Share Current Workflow... - Save the current canvas workflow to the shared directory. The name field is pre-populated from the current workflow tab.
  • Save to "[name]" - Appears after loading or sharing a workflow. Saves directly to the linked shared workflow without opening a dialog.
  • Settings panel - The ERPK Settings panel shows an inline shared workflows list with Load, Delete, and Share Current buttons.

Linked save-back: When you load a shared workflow or share one, the workflow name is linked. Subsequent edits can be pushed back to the shared copy via the "Save to" menu item. Other users see the updated version when they browse.

Authorship tracking: Each shared workflow records who created it and who last modified it. On overwrite, the original creator is preserved while the modifier is updated.

Toast notifications: Success/error feedback appears as a brief toast in the top-right corner for all save, load, and delete operations.

Storage: Workflows are saved as JSON files in shared_workflows/ under the ComfyUI base directory (e.g., ~/Documents/ComfyUI/shared_workflows/), alongside input/, output/, and models/. This location persists across plugin upgrades and ComfyUI restarts. Falls back to the extension directory when running outside ComfyUI. Each file uses an envelope format ({meta, workflow}) that stores authorship metadata alongside the workflow graph. No API keys or user-specific data are stored.

API Endpoints:

| Endpoint | Method | Description | |----------|--------|-------------| | /erpk/shared_workflows | GET | List all shared workflows (metadata including authorship) | | /erpk/shared_workflows/{name} | GET | Get a single workflow by name | | /erpk/shared_workflows | POST | Save a workflow ({name, workflow}); records user as author | | /erpk/shared_workflows/{name} | DELETE | Delete a workflow by name |

SaveImage Metadata Toggle

Adds a strip_metadata toggle to ComfyUI's built-in SaveImage node (and PreviewImage, which inherits it). When enabled, both the workflow JSON and prompt data are stripped from saved PNG files, producing clean images with no embedded ComfyUI metadata.

  • Per-node control - Each SaveImage node gets its own boolean toggle; no global setting needed
  • Off by default - Metadata is preserved unless you explicitly enable stripping
  • Prompt metadata also stripped - Both extra_pnginfo (workflow graph) and prompt (API-format node data) are removed when enabled

Auto-Clear Job History

Automatically removes completed jobs from the history panel after each run. Prevents the UI from slowing down during long sessions with many queued generations.

  • Off by default - Enable via Settings > ERPK > General > Auto-Clear Job History
  • Delayed cleanup - Waits 5 seconds after job completion so the frontend can fetch results before the history entry is removed
  • No restart needed - Toggling the setting takes effect on the next completed job

Installation

Method 1: ComfyUI Manager (Recommended)

  1. Open ComfyUI Manager
  2. Click Install Custom Nodes
  3. Search for erpk
  4. Find ERPK Custom Nodes and click Install
  5. Restart ComfyUI

Method 2: ComfyUI Registry

Install directly from the ComfyUI Registry web interface.

Method 3: Manual Installation

  1. Navigate to your ComfyUI custom_nodes directory:

    cd /path/to/ComfyUI/custom_nodes/
    
  2. Clone this repository as erpk:

    git clone https://github.com/eRepublik-Labs/comfyui-nodes-erpk.git erpk
    
  3. Install dependencies:

    cd erpk
    pip install -r requirements.txt
    
  4. Restart ComfyUI

Post-Installation

  1. Configure API keys for the services you want to use. The easiest way is via right-click on the canvas > ERPK Settings, or Settings > ERPK > API Keys in ComfyUI -- keys are stored per-user and never saved in workflows. In the ERPK Settings panel, API-key fields show a masked preview (e.g. sk-a…kgAA) and a small Edit affordance; click a key to reveal the input, blur to re-mask.

    API keys are resolved in priority order:

    1. ComfyUI Settings (recommended) -- right-click canvas > ERPK Settings
    2. Widget input -- api_key field on client/config nodes
    3. Config file -- provider/config.ini

    Multi-user support: In multi-user ComfyUI installations, each user's API keys are stored separately in their own comfy.settings.json. The correct user's keys are resolved automatically during workflow execution. A "Current user: [name]" banner appears in the ERPK Settings panel when multi-user mode is active.

  2. Find nodes under their respective categories: ERPK/WaveSpeedAI, ERPK/Claude, ERPK/Gemini, ERPK/OpenAI, ERPK/Grok, and ERPK/utils

Backward Compatibility

This package uses the ComfyUI V3 node API. Saved workflows that reference older node IDs (e.g. "WaveSpeed Custom SeedreamV4") are automatically migrated to the current node IDs at load time via ComfyUI's NodeReplace system. No manual workflow editing is required.

ComfyUI API Integration

ComfyUI provides a REST API that allows programmatic workflow creation and execution. This is useful for automation, testing, and integration with external tools.

Available Endpoints

| Endpoint | Method | Description | |----------|--------|-------------| | /system_stats | GET | System information (OS, RAM, GPU, versions) | | /object_info | GET | List all available nodes and their input/output types | | /prompt | POST | Queue a workflow for execution | | /queue | GET | View pending and running jobs | | /history | GET | View execution history and results | | /history/{prompt_id} | GET | Get results for a specific execution |

Submitting a Workflow via API

curl -X POST http://localhost:8188/prompt \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": {
      "1": {
        "class_type": "GeminiAPIConfig",
        "inputs": {
          "api_key": ""
        }
      },
      "2": {
        "class_type": "GeminiTextGeneration",
        "inputs": {
          "client": ["1", 0],
          "prompt": "Write a haiku about ComfyUI",
          "model": "gemini-2.5-flash",
          "temperature": 0.7,
          "max_tokens": 256
        }
      },
      "3": {
        "class_type": "PreviewAny",
        "inputs": {
          "source": ["2", 0]
        }
      }
    }
  }'

Note: The port may vary (8000 for desktop app, 8188 for standard installation).

Workflow JSON Format

Workflows can be saved as JSON files in your ComfyUI workflows directory. The format includes:

  • nodes: Array of node definitions with id, type, pos, inputs, outputs, and widgets_values
  • links: Array of connections in format [link_id, source_node, source_slot, target_node, target_slot, type]
  • last_node_id / last_link_id: Tracking for ID generation

Checking Available Nodes

# List all ERPK nodes
curl -s http://localhost:8188/object_info | jq 'keys' | grep -i -E "(gemini|claude|openai)"

License

MIT License