Yu-Gi-Oh! Card Generator
A real Yu-Gi-Oh! card printer, not an AI guesser
- art
- card_image
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, ordarksynchro. - name, attribute, level_rank, type - the card's identity.
attributeeven 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.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| seriesopt | COMBO | series_10 | 1 options: series_10 |
| frameopt | COMBO | effect | 11 options: darksynchro, effect, fusion, link, normal, ritual, +5 |
| nameopt | STRING | My Custom Card | — |
| attributeopt | COMBO | 10 options: none, dark, light, trap, spell, earth, +4 | |
| typeopt | STRING | [ Spellcaster / Normal ] | — |
| iconopt | COMBO | 7 options: none, continuous, equip, field, quick-play, ritual, +1 | |
| level_rankopt | INT | 70–12 | — |
| artopt | IMAGE | — | |
| effectopt | STRING | The ultimate wizard in terms of attack and defense. | — |
| atk_valueopt | STRING | 2500 | — |
| def_valueopt | STRING | 2100 | — |
| link_ratingopt | STRING | auto | — |
| link_markersopt | STRING | — | |
| is_pendulumopt | BOOLEAN | false | — |
| pendulum_scale_blueopt | STRING | — | |
| pendulum_scale_redopt | STRING | auto | — |
| pendulum_effectopt | STRING | — | |
| corner_textopt | STRING | — | |
| set_idopt | STRING | — | |
| passwordopt | STRING | — | |
| editionopt | STRING | — | |
| copyrightopt | STRING | ©2020 Studio Dice/SHUEISHA, TV TOKYO, KONAMI | — |
| json_overrideopt | STRING | {} | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| card_image | IMAGE | — |