Skip to content

Instantly share code, notes, and snippets.

@zeke
Created August 24, 2026 04:12
Show Gist options
  • Select an option

  • Save zeke/55c232e881274f3199471fd35163b931 to your computer and use it in GitHub Desktop.

Select an option

Save zeke/55c232e881274f3199471fd35163b931 to your computer and use it in GitHub Desktop.
How I made the Zloppy Zeke card: nano-banana-2 on Replicate, five reference images, and the prompt

How I made the Zloppy Zeke card

Someone asked how I made the trading card image at the top of my Slop Detection post. Here's the whole recipe: model, inputs, prompt, and the wrong turns along the way.

Zloppy Zeke

The model

google/nano-banana-2 on Replicate. It takes a text prompt plus up to 14 reference images, which is the part that matters here. I used five references: one for style, four for my face. Each image took about 10 seconds to generate at 1K.

I ran everything through the HTTP API from an agent session, in batches of three or six at a time, so I could look at variants side by side instead of babysitting one generation at a time.

Where it started

The post already had a thumbnail: a card called "Suzy Slop," a gross-out cafeteria lunch lady ladling gray-green goo. I'd made that one earlier from a screenshot of real Garbage Pail Kids cards plus a text prompt.

Suzy Slop

Then I decided the character should be me.

First attempt, which didn't work

I passed two reference images: the Garbage Pail Kids screenshot for style, and one selfie off my desktop for likeness. The prompt asked for a caricature with "receding curly gray-and-black hair, round clear-framed glasses, a trimmed gray-and-dark scruffy beard, and warm smiling expression."

Six variants came back. They were card-shaped and grotesque in the right way, but the face was a generic cheerful cartoon man. One variant had him happily eating his own slop, which is the opposite of the joke.

Three problems, all fixable in the prompt or the inputs:

  1. One selfie isn't enough likeness signal.
  2. "Warm smiling expression" is why he looked jovial. I asked for that.
  3. Nothing in the prompt said he was serving the slop rather than eating it.

What fixed it

For likeness, I swapped in four real photos of myself from a private repo where I keep source images for deepfake experiments. Different angles, different light, same face. Any handful of clear photos would do.

For style, I stopped using the Garbage Pail Kids screenshot and passed the finished Suzy Slop card instead. Feeding a generated card back in as a reference locked the layout, the cream border, the halftone print texture, and the "CAFETERIA LUNCH LADS" banner.

Then I broke the prompt into five chunks so I could change one thing at a time: card wrapper, scene, mood, likeness, and shot. The likeness and mood chunks got specific to the point of being rude about my own face:

REF_NOTE = (
    "The character's face must closely match the real man shown in the attached reference photos: "
    "a receding hairline with frizzy curly gray-and-brown hair on the sides and back, round light "
    "clear/pink-tinted glasses, a full scruffy gray-and-white beard and mustache, deep-set eyes, and "
    "a prominent nose, exaggerated only slightly into a caricature while staying clearly recognizable "
    "as this specific person, not a generic bald cartoon man. Keep his real hair pattern (receding on "
    "top, curly on the sides), not a full head of hair."
)

MOOD_NOTE = (
    "His expression is NOT happy or jovial: he looks tired, flat, deadpan, mildly annoyed or "
    "unimpressed, with half-lidded eyes and a straight or slightly downturned mouth, going through "
    "the motions of a bad job."
)

Naming the failure mode out loud ("not a generic bald cartoon man") worked better than describing the target alone.

The final prompt

Here it is fully assembled, with the winning shot description at the end.

A physical vintage trading card from the 1980s, photographed close-up, showing
visible wear: slightly rounded worn corners, faint scuffs, soft paper cardstock
texture, visible halftone dot printing pattern, and slightly faded, off-register
color printing typical of cheap 1980s bubble-gum trading cards, in the exact
visual style of the attached reference card (same card layout, border, print
texture, and illustration style). At the very top of the card, inside a banner
ribbon shaped like the one on the reference card, bold cartoon lettering reads
"CAFETERIA LUNCH LADS" instead of "GARBAGE PAIL KIDS".

Below that banner: The illustration shows the man standing at an old-school
cafeteria steam table, ladle in hand, mid-motion slopping a heap of gray-green
goo from a large vat into a tray held by an unseen student just out of frame at
the bottom edge of the panel. Steam rises from the vat. He wears a stained apron
and hairnet. He is only serving the slop, never eating it.

His expression is NOT happy or jovial: he looks tired, flat, deadpan, mildly
annoyed or unimpressed, with half-lidded eyes and a straight or slightly
downturned mouth, going through the motions of a bad job.

The character's face must closely match the real man shown in the attached
reference photos: a receding hairline with frizzy curly gray-and-brown hair on
the sides and back, round light clear/pink-tinted glasses, a full scruffy
gray-and-white beard and mustache, deep-set eyes, and a prominent nose,
exaggerated only slightly into a caricature while staying clearly recognizable
as this specific person, not a generic bald cartoon man. Keep his real hair
pattern (receding on top, curly on the sides), not a full head of hair.

Bright saturated colors, thick black outlines, exaggerated cartoon proportions,
painted airbrush illustration style. At the bottom of the card, inside the white
border area, a bold rounded caption plate in a solid contrasting color contains
the name "ZLOPPY ZEKE" in thick, playful, hand-lettered cartoon type, matching
the style of the illustration above it.

The card rests at a slight natural angle on a dark walnut wooden desk,
photographed close-up with a shallow depth of field so the wood grain in the
foreground and background is softly blurred, warm directional lamp light raking
across the card's glossy print, slight film grain, macro photography of a
physical printed collectible card, not a digital illustration, no hands or other
objects in frame.

The last round was about furniture

I had a version in an open PR where the card was held up in someone's hand in an empty room. Then I saw it rendered on the site and hated it. The hand was doing nothing for the composition and the background was a void.

Held in hand

So I regenerated with three different surface treatments, changing only the shot chunk:

  1. Flat and straight-on, honey-toned wood, soft overhead light.
  2. Top-down flat lay on a rustic weathered table, window light from one side.
  3. Slight angle on a dark walnut desk, shallow depth of field, raking lamp light.

Number three won. Same card, same face, better object.

The code

Nothing clever. Read files, base64 them, POST, poll.

import base64, json, os, urllib.request

TOKEN = os.environ["REPLICATE_API_TOKEN"]

def data_uri(path):
    with open(path, "rb") as f:
        return "data:image/jpeg;base64," + base64.b64encode(f.read()).decode()

body = json.dumps({
    "input": {
        "prompt": prompt,
        "aspect_ratio": "4:3",
        "resolution": "1K",
        "image_input": [suzy] + zeke_photos,
    }
}).encode()

req = urllib.request.Request(
    "https://api.replicate.com/v1/models/google/nano-banana-2/predictions",
    data=body,
    headers={
        "Authorization": f"Bearer {TOKEN}",
        "Content-Type": "application/json",
    },
    method="POST",
)
with urllib.request.urlopen(req) as resp:
    prediction = json.load(resp)

Then poll GET https://api.replicate.com/v1/predictions/{id} until the status is succeeded and download the URL in output. image_input also accepts plain URLs, so you can skip the base64 dance if your references are already on the web.

What actually mattered

Four photos beat one. Naming the failure you keep getting ("not a generic bald cartoon man," "NOT happy or jovial") beats adding more adjectives. Asking for a photograph of a worn physical card, with halftone dots and off-register ink and shallow depth of field, is what makes it read as an object instead of a JPEG.

All fifteen variants are in the repo under content/slop-detection/zlop-variants if you want to see the ones that didn't make it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment