Nodes/ComfyUI Civitai MCP/Civitai Post Image
ComfyUI Node

Civitai Post Image

Post a render to Civitai straight from the graph, metadata included

By daceheg·Created 3 months ago·Updated 3 months ago· 6
Civitai Post Image
  • image
  • post_id
  • post_url
enabletrue
publishtrue
title
description
model_version_id0
collection_id0
a1111_params
workflow_json
embed_metadatatrue
embed_workflowtrue
file_formatpng
jpg_quality95

The whole reason this pack exists. Wire a generated image into this node, hit run, and it uploads the image to Civitai and creates a post for it - with the generation metadata auto-embedded, so the post shows the prompt, sampler, seed and the exact models/LoRAs used, exactly like a well-made sample image should. One image per execution, one post per run. If you're posting single renders without wanting to tab over to the website and re-type everything, this is the node.

The inputs that matter

  • image (required) - the image tensor to post. Trap: if it's a batch (say from batch_size > 1 or an Image Batch node), only the first image gets posted, with a warning printed to the console. Posting a batch together is Civitai Create Post's job.
  • enable (required, default true) - master switch. Flip it false and the node skips upload entirely. This is how you gate posting behind a condition without bypassing the node.
  • publish (required, default true) - true publishes immediately, false saves a draft. Set it to false the first time you run this. You are one click away from putting content on a public, moderation-scanned site.
  • title, description - post title and markdown description.
  • model_version_id, collection_id - link the post to a model version or a collection/contest (grab IDs from the URL).
  • a1111_params - an explicit A1111-format parameters string. Wire ComfyUI-Image-Saver's a1111_params output here for full control; leave empty to auto-detect.
  • workflow_json - embed a specific workflow (e.g. the original graph of a re-posted image from a metadata loader). Takes precedence over the live workflow.
  • embed_metadata / embed_workflow (default true) - toggle metadata and workflow embedding.
  • file_format (png default / jpg) - PNG carries metadata plus workflow; JPEG carries parameters in EXIF, smaller but no workflow. jpg_quality (default 95) applies to JPEG.

Outputs: post_id (INT) and post_url (STRING) - the link to your new post (or draft).

How it works

This is where the pack earns its keep. If a1111_params is empty, the node walks your prompt graph and reconstructs the A1111 parameters string: it traces the sampler's conditioning back to the prompt text, reads steps/sampler/seed/CFG off the sampler chain, maps ComfyUI sampler names to Civitai's display names, and builds a Civitai resources list by SHA256-hashing your checkpoint and LoRA files and looking them up against Civitai's by-hash endpoint - getting back AIR URNs, cached in .civitai.info sidecars so it doesn't re-hash multi-GB checkpoints every run. Then it embeds that string (plus the workflow) into the PNG and uploads it to Civitai's MCP upload_image tool, which returns a UUID, and calls create_post with it.

Installing it and setting up

ComfyUI Manager, search ComfyUI Civitai MCP, or:

cd ComfyUI/custom_nodes
git clone https://github.com/daceheg/ComfyUI-civitai-mcp.git

Restart after. The pack's only dependency is requests. You need a Civitai API key - stored in civitai_key.txt in the pack folder or as a CIVITAI_API_KEY env var. It's deliberately not a node input, because ComfyUI bakes widget values into saved PNGs and nobody wants their key inside an uploaded image's metadata.

Where people get burned

The 10 MB upload cap is the big one: Civitai's MCP upload rejects anything over 10 MB, so a high-res PNG will error with a message telling you to use JPEG or lower the resolution. And then there's the existential one: automated posting is real posting. Civitai's moderation stack - prompt scanning, VLM image classification, a community rating game - is exactly the thing this node hands your output to. Publish drafts first, check your account status with Civitai Account Status, and only automate once you trust what the pipeline produces. This pack is young and small, so when posting fails, the error text is your map - read it before assuming a bug.

CategoryCivitai-mcp

Inputs (13)

NameTypeDefaultDescription
imageIMAGE
enableBOOLEANtrueWhen disabled, skips the upload and post entirely. Use this to gate posting without bypassing the node.
publishBOOLEANtrue
titleoptSTRING
descriptionoptSTRING
model_version_idoptINT00–18446744073709550000
collection_idoptINT00–18446744073709550000
a1111_paramsoptSTRINGA1111-format generation parameters to embed. Wire ComfyUI-Image-Saver's 'a1111_params' output here for full Civitai metadata (prompt, sampler, Civitai resources/AIRs). If empty, the node auto-detects from the workflow.
workflow_jsonoptSTRINGComfyUI workflow JSON to embed (PNG only). Wire a Civitai metadata loader's 'workflow_json' output here to preserve the original graph of a re-posted image. Takes precedence over the live workflow; falls back to it when empty.
embed_metadataoptBOOLEANtrueEmbed generation parameters into the uploaded image so Civitai shows full metadata.
embed_workflowoptBOOLEANtrueEmbed the ComfyUI workflow + prompt graph (PNG only) so the post is reproducible by drag-and-drop into ComfyUI.
file_formatoptCOMBOpngPNG carries metadata + workflow in text chunks (lossless). JPG carries the parameters in EXIF (smaller, no workflow).
jpg_qualityoptINT951–100JPEG quality (only used when file_format is jpg).

Outputs (2)

NameTypeDescription
post_idINT
post_urlSTRING