Ashish · field notes
All notes
← back to the system map
LiveMarketing & Brand2 min read

AI image-generation pipeline

Marketing images used to be a designer on retainer and a stock library. Now they are two scripts and an API key, built from our own photos.

Every property burns through images. Hero shots, social posts, seasonal refreshes, all of it constant. The default answer is a designer on retainer or an agency queue, and I wanted neither. What I actually wanted was to type a prompt and get back a graded, on-brand image built from our own photography.

How it works

I split the job along a line I learned the hard way. Gemini's image model (billing on, paid tier) does the photographic part: color grade, atmosphere, background restyle, the scrim. Pillow does the text layer, and only the text, because the image model misspells caption copy every single time. An orchestrator script hands the graded background to a Pillow text engine. I cache every Gemini background per source photo, so reworking the copy or the scrim re-composites for free with no new API call.

Gemini owns the light. Pillow owns the letters. Ask the image model to spell and it will let you down every time.

This is the whole marketing-production seat compressed into a repo. There is no creative queue to wait on, and when an exception shows up (a bad grade, a template-y layout) I fix the script once and it stops coming back. That is the shape of the bet in every seat. The owner keeps the taste, the agent keeps producing.

Got an idea? Tell me →More field notes