Nodes/ComfyUI-YuGiOh/Yu-Gi-Oh! Card Generator
ComfyUI Node

Yu-Gi-Oh! Card Generator

A real Yu-Gi-Oh! card printer, not an AI guesser

By SidDays·Created 7 months ago·Updated 7 months ago· 1
Yu-Gi-Oh! Card Generator
  • art
  • card_image
seriesseries_10
frameeffect
nameMy Custom Card
attribute
type[ Spellcaster / Normal ]
icon
level_rank7
effectThe ultimate wizard in terms of attack and defense.
atk_value2500
def_value2100
link_ratingauto
link_markers
is_pendulumfalse
pendulum_scale_blue
pendulum_scale_redauto
pendulum_effect
corner_text
set_id
password
edition
copyright©2020 Studio Dice/SHUEISHA, TV TOKYO, KONAMI
json_override{}

You know how diffusion models are great at art and terrible at text on a card? This node fixes exactly the wrong half. Yu-Gi-Oh! Card Generator pastes your generated art into a real, pre-drawn Yu-Gi-Oh! card frame and then renders the name, attribute, stars, effect text, and ATK/DEF with the actual Matrix and Stone Serif fonts. The result looks like it came out of a pack - crisp text, correct layout - instead of the usual AI gibberish where the "effect" is four words of half-remembered runes.

It's a deterministic compositor, not a generator in the diffusion sense. No API, no key, no model download, no hidden network calls. The node ships with a full set of series-10 card frames (normal, effect, fusion, synchro, xyz, link, ritual, spell, trap, token, darksynchro) and the bundled fonts, so it works offline out of the box. If your only goal is a meme card or a playtest proxy, this is the whole workflow: one checkpoint, one prompt, one of these nodes, done.

How it works

Under the hood it's a Pillow compositing pipeline. It loads the frame PNG you picked (813×1185, the real card ratio), LANCZOS-resizes whatever image you feed into art into the card's artwork window, then draws each element from a layout config - title top-left, attribute icon top-right, level stars, the type line, the effect box, and the ATK/DEF footer with its separator rule. The effect box is the clever part: it auto-shrinks the font until the text fits, and it understands Yu-Gi-Oh! style markup. Wrap text in [[double brackets]] to justify it to both edges, [single brackets] to compress it, {curly braces} to keep a phrase unbreakable - real card typesetting, not just a text dump.

Inputs that actually matter

Most of the 24 inputs you'll see are self-explanatory text fields, and a few you'll set every time:

  • art - the image that becomes the card artwork. Connect your KSampler output here. Keep it roughly square; it's stretched into a 614×614 window, so a portrait or landscape image gets squeezed.
  • frame - the card type: effect, normal, fusion, synchro, xyz, link, ritual, spell, trap, token, or darksynchro.
  • name, attribute, level_rank, type - the card's identity. attribute even includes the Divine God card icon.
  • effect - your effect text, multiline. Try the bracket markup.
  • atk_value / def_value - the footer stats.

The single output is card_image (an IMAGE tensor). Wire it straight into a Save Image or Preview Image node. Note that series is a stub - the only choice is series_10 right now, so ignore it.

Installing it

The easiest path is ComfyUI Manager: search "ComfyUI-YuGiOh" and hit install. Or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/SidDays/ComfyUI-YuGiOh

Then restart ComfyUI. That's it - no requirements.txt, no models to fetch, no extra pip installs. It leans on the PIL, torch, and numpy that ComfyUI already ships, so it's one of the lightest installs you'll ever do.

Where people get burned

Two real gotchas, both visible in the source. First, art is labeled optional but the node errors if you leave it unconnected - it will happily call .cpu() on None. Wire in an image every time. Second, several inputs are scaffolding, not features yet: icon, is_pendulum, the pendulum scales/effect, link_markers, and json_override are accepted by the node but the shipped code has those drawing steps commented out. Don't spend an hour tuning link markers expecting them to appear - they won't until a later release. That's the price of a young pack: the git history is essentially one commit and even the unit tests still reference the cookiecutter template's example node. It works, but treat it as v0.1 and check the repo before you plan a whole series around it.

One last thing: the copyright line defaults to the official © Studio Dice/KONAMI footer. Real cards don't carry that. This is a fan-tool; keep your proxies out of sanctioned tournaments and don't sell them, and you're fine.

CategoryYu-Gi-Oh!

Inputs (23)

NameTypeDefaultDescription
seriesoptCOMBOseries_101 options: series_10
frameoptCOMBOeffect11 options: darksynchro, effect, fusion, link, normal, ritual, +5
nameoptSTRINGMy Custom Card
attributeoptCOMBO10 options: none, dark, light, trap, spell, earth, +4
typeoptSTRING[ Spellcaster / Normal ]
iconoptCOMBO7 options: none, continuous, equip, field, quick-play, ritual, +1
level_rankoptINT70–12
artoptIMAGE
effectoptSTRINGThe ultimate wizard in terms of attack and defense.
atk_valueoptSTRING2500
def_valueoptSTRING2100
link_ratingoptSTRINGauto
link_markersoptSTRING
is_pendulumoptBOOLEANfalse
pendulum_scale_blueoptSTRING
pendulum_scale_redoptSTRINGauto
pendulum_effectoptSTRING
corner_textoptSTRING
set_idoptSTRING
passwordoptSTRING
editionoptSTRING
copyrightoptSTRING©2020 Studio Dice/SHUEISHA, TV TOKYO, KONAMI
json_overrideoptSTRING{}

Outputs (1)

NameTypeDescription
card_imageIMAGE