Nodes/ComfyUI-RetroDiffusion-API-Node/Retro Diffusion API Node
ComfyUI Node

Retro Diffusion API Node

The Retro Diffusion API node

By svntax·Created about a year ago·Updated 10 months ago· 9
Retro Diffusion API Node
  • input_image
  • image
  • credit_cost
  • remaining_credits
seed0
width128
height128
prompt_style
bypass_prompt_expansionfalse
remove_bgfalse
tile_xfalse
tile_yfalse
return_spritesheet_for_animationstrue
prompt
denoise1.00

Most custom nodes in your library do the work on your GPU. This one is the exception, in a good way: it's a thin wrapper around the Retro Diffusion API, a paid cloud service trained for 2D game assets - pixel sprites, tilesets, item sheets, character turnarounds, even walk-cycle animation spritesheets. Drop the node in, type a prompt, and Retro Diffusion's servers do the denoising while your GPU just sits there. In exchange, every generation spends credits from your account.

The name is honest this time. Half the "API" nodes you'll find in the Manager turn out to be local wrappers that don't need a key; this one genuinely calls a remote service and bills you per image. The credit accounting is even wired into the node so you can't pretend otherwise.

Why you'd reach for it

Game-asset generation is the one niche where the local ComfyUI stack fights you. Checkpoints trained on photographs push back when you want a 128×128 sprite that tiles seamlessly and ships with a transparent background. RetroDiffusion is built specifically for that: 39 style presets across rd_fast, rd_plus, and animation tiers, plus server-side background removal and tiling. If you're prototyping game art, that's far less fiddly than coercing a local SDXL into a usable sprite sheet. The tradeoff is the one the ecosystem keeps bumping into - paid cloud convenience vs. the open local toolchain - and for this use case the convenience genuinely wins.

How it works

The node is a few hundred lines of requests. On execution it POSTs to https://api.retrodiffusion.ai/v1/inferences with your key in an X-RD-Token header and a JSON payload carrying seed, width/height, prompt_style, prompt, and a handful of booleans. Feed it an input_image and it base64-encodes a PNG, sending denoise along as the img2img strength - that's also how animation styles take a reference image. The response comes back as base64-encoded images plus credit_cost and remaining_credits; the node decodes the first image into a normal tensor and passes the numbers through.

Inputs and outputs that matter

You'll set a handful of these on day one:

  • prompt - your text prompt, multiline.
  • prompt_style - 39 presets; think of it as your model choice. rd_fast__* is the cheap tier, rd_plus__* pricier and more detailed, animation__* outputs sprite animations.
  • width / height - 16 to 512, step 8, default 128. This is sprite-sized on purpose; you won't be printing wallpapers here.
  • denoise - only used when input_image is connected; it's the img2img strength.
  • remove_bg, tile_x, tile_y - server-side transparent background and seamless tiling along each axis.
  • bypass_prompt_expansion - the service rewrites your prompt by default; flip this on if you want your exact words sent through.
  • return_spritesheet_for_animations - default true gives animation styles a transparent PNG spritesheet instead of a GIF.

Outputs: image (wire it into PreviewImage or SaveImage), plus credit_cost and remaining_credits as INTs - useful if you want a per-generation cost readout in your workflow.

Installing it

  1. Sign up at retrodiffusion.ai and create an API key in the developer tools.
  2. In your ComfyUI root folder, create a .env file (if it doesn't exist) containing RD_API_KEY=your-key.
  3. Install via ComfyUI Manager (search "RetroDiffusion") or:
cd ComfyUI/custom_nodes
git clone https://github.com/svntax/ComfyUI-RetroDiffusion-API-Node
  1. Restart ComfyUI.

No model downloads - that's the entire point, everything runs remotely. Dependencies are just requests and python-dotenv, which almost every ComfyUI install already has; pip install requests python-dotenv sorts it if the import errors.

Gotchas

The most important one is straight from the source code: on any request failure the node doesn't crash your workflow - it silently returns a black 64×64 tensor and sets remaining_credits to -1. Black square in your preview means the request failed; read the console, because nothing else will tell you.

  • Key not found? load_dotenv() reads from wherever you launch ComfyUI, usually its root. If the console prints "API request failed", verify .env is in the right place and RD_API_KEY is set.
  • img2img has an upload size limit - don't feed it large images (the README calls this out).
  • Width/height cap at 512, so generate small and upscale locally if you need bigger art.
  • One honest aside: the vendor's community history is bumpy. A 2024 NFT promotion went over badly and reportedly got dissenters banned from the Discord. Not a knock on the node itself, but worth knowing before you buy a big credit pack.

For game-asset prototyping, this is a genuinely nice fit - ComfyUI ergonomics, cloud compute, exact credit accounting. If you're a local-first purist, it's not for you. But for what it does, nothing else in the Manager comes close.

CategoryRetroDiffusion

Inputs (12)

NameTypeDefaultDescription
seedINT00–2147483647
widthINT12816–512
heightINT12816–512
prompt_styleCOMBO39 options: rd_fast__default, rd_fast__retro, rd_fast__simple, rd_fast__detailed, rd_fast__anime, rd_fast__game_asset, +33
bypass_prompt_expansionBOOLEANfalse
remove_bgBOOLEANfalse
tile_xBOOLEANfalse
tile_yBOOLEANfalse
return_spritesheet_for_animationsBOOLEANtrue
promptSTRING
denoiseFLOAT1.000–1
input_imageoptIMAGE

Outputs (3)

NameTypeDescription
imageIMAGE
credit_costINT
remaining_creditsINT