Левицький Ян ОлександровичandCursor 50f3b927d8 Initial release: CivitAI API nodes for ComfyUI.
Add Generator and LoRA nodes for cloud image generation via CivitAI Orchestration API, with README and project metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 01:35:08 +02:00

CivitAI SDK API Nodes for ComfyUI

Custom nodes for ComfyUI that generate images through the CivitAI Orchestration API.

Generate images in the cloud using CivitAI checkpoints and LoRAs by AIR URN — no local model files required.

Nodes

Node Description
CivitAI Generator Sends a text-to-image request with API key, checkpoint AIR, and generation parameters. Returns a ComfyUI IMAGE.
CivitAI LoRA Adds a LoRA by AIR URN with configurable strength. Supports chaining multiple LoRAs.

Workflow example

[CivitAI LoRA] ──► [CivitAI LoRA] ──► lora_stack ──► [CivitAI Generator] ──► IMAGE
  1. Add one or more CivitAI LoRA nodes and chain them together.
  2. Connect the final lora_stack output to CivitAI Generator (optional).
  3. Set your API key, checkpoint AIR, prompt, and other parameters.
  4. Connect the image output to Preview Image or Save Image.

Installation

Via ComfyUI Manager

Search for CivitAI SDK API nodes for ComfyUI (if listed) or install from Git URL.

Manual install

cd ComfyUI/custom_nodes
git clone https://github.com/Ave-Mollan/CivitAI-SDK-API-nodes-for-ComfyUI.git
pip install -r CivitAI-SDK-API-nodes-for-ComfyUI/requirements.txt

Restart ComfyUI after installation.

Requirements

  • ComfyUI
  • Python 3.10+
  • Dependencies from requirements.txt:
    • requests
    • Pillow

torch and numpy are provided by ComfyUI.

API key

  1. Open CivitAI Account Settings.
  2. Create an API token.
  3. Paste it into the api_key field of the CivitAI Generator node.

Note: Generation uses CivitAI Buzz credits. Make sure your account has sufficient balance.

AIR URN format

Models on CivitAI are referenced by AIR (Asset Identifier Resource) URNs:

urn:air:sd1:checkpoint:civitai:4384@128713
urn:air:sdxl:checkpoint:civitai:827184@2883731
urn:air:sdxl:lora:civitai:1105685@1242203

Find the AIR URN on the model page on CivitAI (AIR section) or in the model documentation.

CivitAI Generator parameters

Parameter Description
api_key CivitAI API token
model_air Checkpoint AIR URN
prompt Positive prompt
negative_prompt Negative prompt
width / height Image dimensions (256–2048, step 64)
steps Sampling steps (1–150)
cfg_scale CFG scale (1.0–30.0)
scheduler Sampler scheduler (EulerA, DPM2, DDIM, etc.)
seed Seed (-1 = random)
clip_skip CLIP skip layers (0 = disabled)
timeout Max wait time for generation in seconds
lora_stack Optional chained LoRA stack

Outputs: image (ComfyUI IMAGE), job_info (token, job ID, image URLs)

CivitAI LoRA parameters

Parameter Description
lora_air LoRA AIR URN
strength LoRA strength (-2.0 to 2.0)
lora_stack Optional input to chain another LoRA

Supported models

The extension auto-detects the base model from the AIR URN:

  • SD_1_5 — SD1.x checkpoints and LoRAs
  • SDXL — SDXL, SD3, Flux checkpoints and LoRAs

Troubleshooting

Issue Solution
API key is required Enter a valid CivitAI API token
Invalid AIR format Use full URN starting with urn:air:
Generation timed out Increase timeout or check CivitAI service status
Job finished without image output Check Buzz balance, model AIR, and prompt for policy violations

License

MIT License — see LICENSE.

S
Description
No description provided
Readme MIT
32 KiB
Languages
Python 100%