Filmlab is a photo maker I built for myself. I type a description of a scene, and a few minutes later a finished photograph lands in a folder: 4000 pixels wide, with the grain, the soft highlights and the slightly lifted blacks of a frame of colour negative that went through a lab and a good scanner. Nothing leaves my own machines whilst it works. There is no account, no subscription and no cloud service in the loop.

I wanted three things that no ready made tool would give me together. First, photographs that look shot rather than generated: no plastic skin, no glossy stock photo light, no perfect corners. Second, a queue I could fill with a hundred ideas in the evening and find developed in the morning, without an app window open. Third, every photo should carry its own recipe, so that a year from now I can open a file, see exactly how it was made, and make it again with one change.

This article explains how it works, why each part is the way it is, and every setting that matters. It is written for anyone who wants to understand the approach or build something like it. I describe the method and the numbers; the software itself stays on my own machines.

A typical result: a chimney sweep on a flat tar roof in Hamburg, waist up, turned three quarters away from the camera, laughing at something out of frame, hands in the pockets of a black wool jacket with brass buttons. Behind him a pale overcast sky and red brick roofs of uneven heights. The prompt names a Leica M6, a 90 mm lens at f2.8 and Kodak Portra 400. The photo took 211 seconds from the start of drawing to the saved file: 125 seconds to draw, 83 seconds to upscale and about one second for the film finish. The finish read "Portra 400" in the prompt and applied the colour, grain and halation of a mid speed colour negative.

The pipeline at a glance

Every photo goes through the same stages, in a fixed order. The figure below shows every step, from the prompt to the photo on this website, and which machine does it.

Flow chart of all processing: on the laptop the prompt, queue, drawing, checks with a redraw loop, film finish, marks and frame, saved JPG and the On website tick; on a second Mac the upscale, effects, web copies, the cleaned original and the upload of changed files; on the website the manifest, images and the gallery
All processing, box by box: what runs on the laptop, what runs on a second Mac on the network, and what reaches the website.
  1. Prompt. A description written to a strict standard, so the model has nothing to guess. Film effects never go in the prompt.
  2. Drawing. An open image model draws the picture at about 1.8 megapixels on the laptop, in about 2.5 to 4 minutes, longer for a photo with words.
  3. Checks. Software looks at the fresh drawing before anything else happens: a face guard for a doubled head, and a text guard that reads any words the prompt asked for. A drawing that fails is drawn again with a new seed.
  4. Upscale. A second Mac on the network enlarges it to 4000 pixels wide with a photo trained upscaler, in about 85 to 90 seconds.
  5. Effects (optional). Creative effects such as a light leak or a faded print run on the same second Mac, right after the upscale.
  6. Film finish. Back on the laptop, a model of scanned 35 mm film adds the colour of the named stock and its print paper, lens character, halation and grain.
  7. Marks and frame (optional). Scanned style dust, scratches and film burns go on top of the grain, and an instant photo gets its Polaroid frame. The JPG is written at quality 95 with the full recipe inside.
Ten stages from prompt to published photo: prompt, queue, drawing and checks on the laptop, upscale and optional effects on a second Mac, then film finish, marks and frame, saving and publishing
From prompt to finished JPG. Drawing and the upscale run on different machines, so the next photo is already being drawn whilst the previous one is enlarged.

The order is the most important design decision in the project. In short: the image model should only ever draw a clean photograph, the upscaler should only ever see a clean photograph, and everything that makes it look like film is added last, at the final size, where it cannot be smeared.

The model, and why this one

The drawing is done by FLUX.2 [klein] 9B, an open image model from Black Forest Labs, in an 8 bit integer version of about 9.2 GB. It reads prompts through Qwen3 8B, a language model used as the text encoder (8 bit, about 8.4 GB), and turns its result into pixels with the FLUX.2 VAE (about 0.2 GB). Together that is close to 18 GB of model files.

The text encoder matters more than it sounds. Because it is a real language model, it reads relations in full sentences, such as "hands in his jacket pockets". That is why the prompts are plain prose, never lists of tags.

The comparison

I did not start with FLUX. The first version used Z Image Turbo, which is fast and very sharp. I rendered the same set of prompts with both models and laid the results side by side. Z Image Turbo was crisper, but FLUX.2 [klein] 9B looked more like film: softer transitions, more believable skin, light that behaved like light. Sharpness is easy to add and hard to take away convincingly, so FLUX won the day.

The other candidates did not last long:

TriedResult
Z Image TurboSharp, but less filmic in a side by side test of the same prompts. Replaced.
FLUX.2 [klein] 4BStock photo look and more anatomy errors, only about 15 per cent faster. Dropped.
Krea 2 TurboToo heavy for a laptop with 24 GB of memory.
FLUX.2 [klein] 9B, 6 bitSmaller, but slower on this chip than the 8 bit version.
FLUX.3 [klein]The newer model, tried on ten prompts drawn with both. FLUX.2 [klein] 9B won five, FLUX.3 three, two were a tie, and FLUX.3 was slower. Not adopted.
ERNIE ImageRead up on, not installed: nothing in published comparisons suggested a gain for photographs.
FLUX.2 [klein] 9B, 8 bitKept.

The speed and quality study

With the model chosen, I ran a small study of the settings around it. Each variant was rendered from the same prompts and judged by eye on a scale of ten.

Setting testedFinding
Sampler: DDIM Trailing, DPM++ 2M Trailing, Euler ADDIM Trailing and DPM++ 2M Trailing equal at 8 of 10. Euler A slightly harsher. DDIM Trailing kept, as it is also the recommended setting for this model.
3 stepsLoses coherence: fine mechanisms and glass fall apart.
1344 x 768 instead of 1792 x 1024About 30 per cent faster, but visibly softer fine detail. Not used.

Guidance stays at 1, the value this distilled model is made for. That has a consequence that shapes everything that follows: a negative prompt does nothing. There is no way to say "no text" or "no extra fingers". Whatever you do not want has to be prevented by what you do write. I will come back to that in the section on prompts.

The remaining settings are the model's recommended ones: the DDIM Trailing sampler, a shift of 3 with resolution dependent shift switched off, and a drawing size of 1792 x 1024 pixels for the wide format.

The step test: 4 against 8

FLUX.2 [klein] is a distilled model, built to produce a usable image in very few steps. I first chose 4 steps, because it was quick: about one minute per picture. Most landscapes and buildings looked fine.

People did not always. A first quality round on the early photos found hands fused with the tools they held, a bow that turned into two crossing sticks, and a pickup truck that came out as a hybrid of two different cars. So I ran a seed locked test: the same prompts, the same random seeds, rendered once at 4 steps and once at 8. With the seed fixed, the composition stays the same and only the amount of refinement changes, so any difference is caused by the steps alone.

The same scene drawn with the same seed at 4 steps and at 8 steps, with the hands and a pickup truck broken at 4 and correct at 8
Same prompt, same seed. At 4 steps the hands and the truck break; at 8 steps they resolve.

At 8 steps the hands and the pickup truck rendered correctly where they had broken at 4. The price is time: drawing went from about one minute to between 1.5 and 2.5 minutes. I switched to 8 steps for every photo from then on, because a photo with a broken hand is worth nothing at any speed.

One kind of photo gets more. A prompt that asks for words in the picture, in quotes, is drawn at 20 steps. At 8 steps long or unfamiliar words misspell; at 20 the same words, with the same seed, come out spelt right. The extra steps go only where they pay off, so the rest of the queue keeps its pace.

Eight steps did not fix everything, though. Some objects still came out wrong, and that is what led to the prompt rulebook.

The engine, running headless

I first used the model inside Draw Things, a good image app for the Mac. But an app wants a window, an open session and a person in front of it. I wanted a service that runs on its own and keeps going when I close the browser.

Draw Things publishes the source of its engine as the Draw Things community project. I built its server program from that open source and run it headless: no window, no app, just a small server that listens only on the laptop itself and accepts render requests over the same protocol the app uses. The build is a single program of about 155 MB. To check that nothing was lost in the move, I rendered the same request through the new engine and through the original local renderer, with the same models and seed. The pictures were the same, with a mean pixel difference of 1.9 out of 255. Two renders of the same request through the engine differ by at most 1.

Loading the model per photo

The obvious way to make a model server fast is to keep the model loaded in memory between requests. I tried that, and it made things worse. With the drawing model kept resident (about 9.4 GB), the 8 GB text encoder still had to be loaded for every photo, and the laptop with 24 GB of memory started swapping, up to 14 GB of it. The overhead per photo outside the actual drawing rose from about 17 seconds to 55 to 60 seconds.

So the engine loads the model per photo and lets go of it afterwards. macOS keeps the model files in its file cache as clean memory that it can reclaim at any moment, which means the next load is fast without starving anything else. The engine process itself uses about one gigabyte when idle. When the engine starts, it draws one tiny throwaway picture to pull the model files into the cache, so the first real photo does not pay that cost.

One more physical fact: the laptop has no fan, and under a long run of drawings the chip slows down to stay cool. Once the chip is warm, a drawing at 8 steps takes about 2.5 to 4 minutes, and a photo with words at 20 steps about twice that. Two things on the laptop slow it further: a long run of drawings, and macOS indexing new photos in the background whilst the queue runs.

Prompts that cannot go wrong

The first quality round looked at every photo object by object at full size. What it found was consistent. The model is excellent at landscapes, buildings, weather, light, and a single person standing or sitting still. It fails in predictable places:

  • Hands doing something with an object. Polishing a bracelet, rolling a cigar, holding a crate, knitting: the object was dropped, duplicated or fused with the fingers.
  • Long thin objects. A bow, a walking stick, oars, a fishing rod: in seven of nine cases there was a second copy, a break or an impossible crossing.
  • Vehicles. Every car or truck named in a prompt came out as a hybrid of two models, with mismatched wheel arches and cab proportions. Even a pickup in the background.
  • Objects named but not described. The worst single fault was a "wide straw hat" on a rice farmer. The model fused a conical hat with a thatched roof: the brim frayed into loose straws, a tuft burst from the top, and the whole thing floated above the head instead of sitting on it.
  • Unfamiliar crafted objects. A traditional kayak frame became something like a fur covered ribcage. A loom made no mechanical sense.
  • Famous places by name only. A named mountain range came out as a row of cloned identical spires; a lake was given ocean surf.

The pattern behind all of this is simple: the model fails where it has to guess. So the rulebook has one goal, written at the top: nothing in the picture is left for the model to guess. When a rule and a nice idea conflict, the rule wins. When in doubt, cut the object, never its description.

The rulebook in plain words

Six sentences, in a fixed order. Subject and action. Objects. Placement in the frame. Light. A camera line. Texture. One idea per sentence, 70 to 110 words in total. Above about 120 words the model starts to drop clauses, so the important object goes in the first two sentences, never at the end.

Every object fully specified. An object is anything that is not the body, the landscape or the building: a hat, a cup, every visible garment, a bag, a boat. The main object gets its count, type, shape and construction, material, colour, size compared with the body, how it is worn or held, what it touches, how much of it is in the frame, and a few clean edge words. A supporting object gets a shorter version. At most three objects in a picture, worn clothes included.

Here is the difference in practice, in words I wrote for this article. The failing version says "a wide straw hat". The working version says something like "one wide brimmed hat of tightly woven pale wheat straw, round crown, flat brim no wider than his shoulders with a smooth clean edge, sitting level on his head, his whole face visible beneath the brim". It is longer, and it works.

Say it positively. Because the negative prompt does nothing, words like "no", "without" and "never" are banned inside the prompt as well. Writing "no text" tends to plant the idea of text. Instead the prompt describes the clean surface: a plain whitewashed wall, blank weathered boards, an unmarked hull, a handleless cup.

People. One person, none, or a small group of two to four with rules of its own (below). Framed waist up or knees up, so the face and hands are large. Allowed poses are standing, sitting upright, leaning a shoulder against a wall. Kneeling, crouching, cross legged, running and climbing are out, because legs and feet are where the errors hide. Hands have a short list of safe states: in pockets, resting flat, folded, in thick gloves, or wrapped around one compact object such as a mug at chest height. People are caught, not posed: one small real expression, closed mouth by default, and a gaze that varies from a glance into the lens to eyes on what they are doing.

Never a lone arm. A forearm or a hand that enters the frame from the edge, with nobody attached to it, comes out wrong: on a kitchen table the model put a right hand on a left arm. A table is shown as a still life, or with a whole person, and the prompt checker flags a lone arm.

Groups. Two to four people are the hardest thing to draw, because the features of one person leak into the next: two faces merge, clothes swap, a third arm appears. So a group prompt opens with the count ("Two people stand side by side"), gives every person a slot of their own from left to right, makes each one look different from the neighbour in age, hair and the colour of their clothes, gives each a head direction and a hand state that the neighbour does not share, and ends with a gap of open air between them.

No vehicles and no machines. No cars, bicycles, trains, engines or musical instruments, not even in the background. The one exception is a single simple boat, empty, moored by a rope that the prompt describes on mirror calm water, or pulled up on a beach. The ban stands, because the model still fails at vehicles, taxis included.

Text only where it is wanted. Shopfronts, signs, books and screens invite garbled lettering, so an ordinary prompt avoids them and describes every surface as plain. Words appear only in a prompt written for them: one to three short lines in quotes, each up to three words, horizontal, large, on a flat surface facing the camera, in a hand or lettering that is described (painted brush capitals, white chalk, quick ballpoint, gold leaf). The words themselves are what a real person would write there: a name and an age on a birthday banner, a shop's own name over its door, a price and a small joke on a market sign. Nobody writes PARTY on a party banner, so the prompts do not either. A camera brand stays out of a text prompt, because the model prints it on the nearest sign.

Places by shape, not by name. A named place steers the setting, but the shape is written out: one broad pale limestone peak with a jagged uneven ridge, rather than only the name of the mountain. Repeated things such as trees, posts and windows are always "of different sizes and heights, with uneven spacing". Every building gets a wall material with its joints, a roof material, its openings counted, and something it stands on.

Animals. One animal is best, from a short safe list (a Highland cow, a sheep, a red deer hind, a sitting fox, a dog or a cat at home). The posture is written with the legs: standing on four straight legs, lying with all four legs folded under the body, or, for a dog, a cat or a fox, sitting turned three quarters with the hind legs folded close and the head turned to the camera. "Stands still" on its own produced a goat sitting like a dog with its hind legs splayed.

No two objects of the same material. A straw hat next to a straw coat merges into one shapeless mass of straw. Every object gets a material different from its neighbours.

The camera line. One sentence in a fixed shape: a real film camera, a focal length and an aperture, and one film stock spelt exactly as on an approved list of eighteen. With a motion picture stock the camera is a cinema camera. The stock name matters twice: it steers the model's colour, and the film finish reads it later to choose the stock's colour lookup, its grain and its halation. Photos meant to look like an early pocket digital camera, an early phone or an instant camera get a camera line without a stock, and their look comes from an effect instead.

Clean photograph only. LOMO, light leaks, vignettes, scratches, expired film colour: none of it goes in the prompt. Those are added afterwards as effects, under control, at the final size.

Every prompt is checked against a list of forty seven yes or no questions before it is drawn. One "no" sends it back. The first photos under the new rules came out clean, with two useful lessons: a rare natural phenomenon the model has never seen (bubbles frozen inside lake ice) still comes out wrong, and a uniform jacket invites a lettered badge unless the sleeve is described as plain.

Mistakes the model makes, and how we stop them

An image model does not know when it has made a mistake. It draws a hand with six fingers as confidently as a hand with five. So the quality of these photographs does not come from one clever setting. It comes from a chain of safeguards, and every link in it was added after a real photo went wrong. This chapter shows the whole chain, with the honest story behind each link. My own prompts stay private; the small examples below are invented for this article.

What went wrong

Three quality rounds looked at the early photos object by object: 31 photos drawn at 4 steps, then 64 photos, then 16 animals at 8 steps. Each photo got a verdict of clean, minor or bad, and each fault was traced back to its cause. In the second round 28 photos were clean, 29 had a minor fault and 7 were bad. The faults were not random. They clustered, and each cluster got its own safeguard.

FaultCauseSafeguard
Hands fused with the tool they hold, or holding nothing at allFine handwork, such as polishing or rolling, asks for two things touching in motion; 4 steps left it unresolved8 steps for every photo; hands only in a short list of still states; no handwork in any prompt
Long thin objects doubled or broken: a bow, a stick, oarsA thin line across the body is easy for the model to lose and redrawBanned in and near the hands; the prompt checker flags the words
Fused cars: every car or truck a hybrid of two modelsThe model blends the many vehicles it has seen into oneNo land vehicles anywhere in a photo; one simple moored boat is the only exception
A straw hat that frayed into loose straws and floated above the headThe hat was named but not described, next to a straw coatEvery object fully specified; hats sit level with the face visible; never two objects of the same material
A goat sitting like a dogThe word "sits" was used to place the animal in the framePlacement words that are not postures; the legs always written out
Animals with a missing leg, or a hoof that belongs to no legThree quarter views and animals lying side onStanding animals front on or in clean side profile; legs folded under the body or hidden in grass, every leg counted
A sitting dog with its underside drawn far too prominentlySitting square to the camera, the belly and hind legs open to the lensDogs and cats sit turned three quarters with the head to the camera, or lie down; the prompt checker flags front on sitting
Misspelt or garbled words on a signLong or unfamiliar words at 8 steps, small text, a brand name nearby20 steps for every photo with words; short quoted lines; no brand in a text prompt; the text guard
Words that nobody would writeA banner that only said what the scene wasWording a real person would choose: names, ages, prices, shop names
A swan without a headThe bird was seen from behindNo rear views; the head counted and placed in the prompt
Two faces in one headThree different direction cues for one headOne head, one direction; the face guard
Everyone framed alike, and too posedSafe rules applied the same way to every personCandid rules and a spread of framings across each set
Cloned mountain spires, ocean surf on a lakeA famous place named but its shape left to guessShapes written out; repeated things of different sizes
Dust that looked drawnToo regular specks, and one speck drawn far too largeA library of 50 scanned style overlays at 4096 pixels, built from how dust really shows on a scan

Eight steps instead of four

The first safeguard was the cheapest to explain and the most expensive in time. The seed locked test in the chapter on the model showed that hands and a pickup truck which broke at 4 steps came out right at 8. Every photo is drawn at 8 steps, and a photo with words at 20. It roughly doubled the drawing time, and it fixed a whole class of half finished hands and objects. It did not fix objects the model had to guess, which is why everything below exists.

A checker reads every prompt before it is queued

The rulebook in the previous chapter only helps if every prompt actually follows it, and a long list of rules is easy to break by accident. So no prompt reaches the queue without two checks. The first is mechanical: it counts the words, demands exactly one film stock from the approved list, rejects any negation word, any dash, any banned subject (vehicles, lettering, long thin objects, kneeling, handwork), and any title used before. The second is a careful read against the forty seven questions of the checklist, the ones a word list cannot answer: is the hat fully described, does the person face into the frame, is anything crossing the body.

The second check earns its place. In one batch of a hundred prompts, 76 passed as written, 14 were rewritten and 10 were replaced by a different subject. Typical catches: a basket filled with small berries (many small repeated objects), reflective bands on a jacket (they invite lettering), a lens longer than the limit for candid people, a slope where the person must stand on level ground, and a large animal whose horns and hanging coat the model handles badly.

Candid, not posed

The first rulebook made people safe, and then it made them all the same. Every person stood in a third of the frame, waist up, at the same distance, gazing at something off frame. The photos were correct and looked staged. Real documentary photographs are not like that.

So two sections were added. The first makes people candid: they are unaware of the camera, they show one small real expression caught mid moment (squinting into wind, a half smile, a slow breath out in cold air), and their body is relaxed and a little asymmetric, with the weight on one leg. The second makes the framing vary the way a photographer's would. Across a set, about a quarter of the people are seen wide in their surroundings, about half at medium distance and about a quarter close. They may stand hard against an edge, low in the frame under a big sky, or small in the centre. Some prompts get one deliberate imperfection: an elbow cut by the frame, a little too much headroom, a horizon tilted slightly. An invented example of the result: a woman near the right edge, in profile facing left, squinting into the wind, one hand in her coat pocket. No two neighbouring prompts in a set may share the same framing or the same hand state.

Everyone alike, again

Safe rules have a price, and a thousand photos made it visible. Laid side by side, the people looked like one person: standing still at a wall or the water, head turned three quarters, gazing at the sea, hands in pockets, waist up from eye height, and laughing the same wide open laugh. Counted over 399 people photos, 82 per cent looked into the distance, two thirds stood still, half were waist up from eye height and more than half laughed or smiled. The model had not chosen this. The rules had, by banning every action out of caution about hands, and Generate had too, with forty of its forty four head directions gazing into the distance.

So fifteen ordinary actions were drawn at a small size, 512 by 640 pixels, to judge pose and expression quickly. Twelve held up: walking away seen from behind, waiting at a corner looking up at the lights, a bag on one shoulder, reading a folded letter, bending over a flower pot, carrying bread under one arm, sweeping a doorstep, a face turned up into the rain, leaning out of a window seen from the street, pouring tea, a shrug into the lens and lying on the grass seen from above. Two did not: hanging washing became a sheet held up like a banner, and tying an apron turned into hands on hips. The rules now ask for a spread across every album, about a third looking toward the camera, a fifth looking down at what they hold, some seen from behind, and a laugh in at most one photo in six, and a small one: the bare word "laughing" gives the same wide toothy laugh every time. The prompt checker counts the spread for each set, and the photos that had the old laugh are being redrawn in place, each with its revision note.

New albums, new lessons

Each new album tested the rules somewhere they had not been before. The first party photos came out posed and frontal: everyone facing the lens, lined up as if for a group portrait. Real party pictures are nothing like that. The party rules now make people candid: caught unaware, in profile, mid conversation, walking past or leaning on a wall, with the camera moving between a low angle, a view from the stairs and a doorway. Selfies are the exception, at most three or four in an album of twenty four, and even then the arm runs out of the frame so that no hand or camera has to be drawn.

The instant street photos went the other way. People in a street are exactly where the model guesses, so this album puts objects first: fire escapes, zebra crossing stripes, shutters, puddle reflections, lanterns, tiles, all close and graphic in a square frame. People appear only as small, soft shapes of passers by in the background, or now and then as one small figure in the middle distance, unaware of the camera, never a portrait. The city is suggested by its street furniture rather than its traffic.

One head, one direction

One photo showed a man with two faces merged in one head: a three quarter face and a profile laid over each other. The prompt behind it gave his head three different directions at once: a gaze "off frame" without saying which side, a body "turned away" without saying from what, and a place in the frame that suggested a third. The model fixes the layout of a face in its very first steps. Given three answers, it drew two of them.

The rule that followed is strict. The person is counted once, at the start. The direction of the head is written exactly once, as one of five fixed terms: in profile facing left or right, in three quarter view facing left or right, or facing the camera. Head and body face the same way, the gaze follows the head, and a person at the edge of the frame faces into it. The whole head stays inside the frame with space around it, and nothing in the scene may show a second face: no mirrors or windows beside the face, no still water at face height, no portraits or statues. Every people prompt still waiting in the queue was rewritten to this rule before it was drawn.

Animals, leg by leg

Animals failed in their own way. The goat that sat like a dog came from a prompt that used the word "sits" only to say where the goat was placed in the frame; the model took it as a posture. The swan without a head was seen from behind, and with no head in view the model lost it altogether, turning the back feathers into something like scales. Animals lying side on grew stray hooves, and animals at a three quarter angle lost a leg behind the body.

The animal rules count everything. An animal is placed, never "sits" unless it is an animal that really sits, such as a fox. A standing animal is seen straight from the front or in clean side profile. A dog or a cat that sits is turned three quarters, hind legs folded close under the body and the head turned to the camera: square to the camera, a sitting dog showed its underside far more prominently than any real photograph would, whilst turned three quarters it looks as it does in life. Standing animals have two front legs under the shoulders and two hind legs under the hips, or legs hidden in tall grass. Lying animals face the camera with the front legs folded under the chest. Horns, ears and tails are counted and anchored to the head or body. Reflections in water are left out, because a reflection invites a second body. Familiar animals with a plain coat render best, so the list of allowed animals is short.

The face guard

Rules lower the risk; they do not remove it. So every drawing of a person is checked by software before it goes on to the upscale. The check uses YuNet, an open face detector from the OpenCV project under the MIT licence, which runs locally in a fraction of the time a drawing takes. It looks at the picture and at its mirror image, which helps it find faces in profile, and it reports every face with a confidence score.

Two findings stop a photo. Two confident faces of about the same size whose centres are less than one face width apart are a doubled head. And in a photo whose prompt describes one person, more than one confident face is one too many. Either way the drawing is thrown away and drawn again with a new random seed, which gives a different composition. After three attempts in all, the photo fails and shows up as failed in the queue, instead of a faulty picture being published. Each attempt, its seed and its reason are written into the photo's record. If the guard itself has a problem, the photo goes through, so a photo is never lost to the safeguard.

The text guard

A photo with words in it gets a second check. The text guard reads the fresh drawing with the text recognition built into macOS, on the laptop itself, in about a tenth of a second, and compares what it reads with the words quoted in the prompt. Case, punctuation and accents do not count. A word has to be spelt exactly; only a word of nine letters or more may differ by one letter, because worn paint and gold leaf can trip the reader. A lone letter or two, such as the P on a parking sign, is left unchecked, because text recognition rarely reports a lone letter.

When a word is missing or misspelt, the drawing is set aside and drawn again with a new seed, in the same loop and with the same limit of three draws as the face guard. If the words are still not right after the third draw, the photo is not lost: the draw that read best is kept, with its own seed and record, and goes on through the pipeline. Every attempt, with what was read and what was missing, is written into the photo's record. Before it was switched on, the guard was tried on every finished photo with words in it. It agreed with my own eye on all of them, apart from the lone P.

Dust that looked drawn

Not every mistake was the model's. The first version of the dust and scratches effect looked fake, and one photo showed why at a glance: a single speck had been drawn far too large, a round grey blob that no scanner would ever produce. The specks were too round and too evenly sized, and the scratches were too straight.

The effect was rebuilt from how dust actually appears on a scan, and then turned into a library: 50 overlays, each a full 35 mm frame at 4096 pixels, so one pixel is about 9 micrometres of film. Twenty are dust, fourteen are scratches, eight are other marks (a dried water spot, a fingerprint smudge, a chemical stain, a crease) and eight are film burns. For each photo a few are picked by its seed, turned by a quarter turn or flipped, cropped at a random spot and laid over the finished grain, so no two photos share the same dust. Most specks are tiny and very few are larger, with a firm cap on the largest size. Specks are irregular clumps of overlapping lobes, some with a fibrous tail. Hairs are thin curved fibres that taper at both ends. Scratches are faint, waver a little and break up along their length. The edges are roughened with fine noise and then softened slightly, as the scanner lens softens them. And the colour follows the physics of a colour negative: dust on the negative blocks light, and when the scan is inverted it turns light, so most specks are light and about a fifth are dark, as dust on the scanner glass would be. The marks are used with restraint: only a minority of photos get them, and then lightly.

Fixing a photo without losing its place

When a published photo turns out to have a fault, it does not have to disappear. A re-render takes the corrected prompt and draws the photo again, and the new file replaces the old one in place: same file name, the same date in the name and in the photo's own date fields, the same spot in the timeline, the gallery and this website. The new prompt and its settings become the photo's recipe, with nothing left of the old version inside the file. The faulty version goes to the Trash. That way a correction never shows up as a new photo, and nobody looking at the gallery sees a gap. Every revision carries a short note of what was wrong and what changed, such as "hand sat reversed on the arm; arm taken out, now a still life", kept in the recipe inside the file and shown in the viewer, so the history of a photo travels with it.

The last check is mine

The final safeguard is a person. Every photo carries an On website tick in the Filmlab gallery. A new photo is ticked by default, so the queue can run overnight and publish as it goes, and a test album is never published at all. I go through the new photos at full size, with the 100 and 200 per cent inspect mode and the loupe, checking the hands, the hats and the edges of objects. Photos that pass every automatic check can still be wrong in a way only a person notices; several of the bad photos in the quality rounds above were ones I had already thrown out by eye. A photo that fails my eye is unticked, which takes it off this website within a minute, or redrawn in place.

The film finish

The finish is the part that turns a clean digital image into something that looks like a scanned frame of 35 mm film. It is not a filter or a ready made preset found online. Its colour comes from a physical simulation of each film stock, described in the next chapter. Every other number in it comes from a research round of 23 sources: Kodak and Fujifilm data sheets, published grain models, scanner tests and lens tests. Each number was read from the opened source, and graph readings were marked as such.

The scale that ties it together: the output is 4000 pixels wide and stands for a 36 x 24 mm frame, so one pixel is 9 micrometres of film. All sizes below are in pixels at 4000 pixels wide and scale with the image.

The film finish stages in order: stock colour from a spektrafilm lookup, lens aberration and vignette, halation, pre grain softness and edge boost, two octave grain
The film finish, in the order light passes through a real camera, film and scanner. For a known stock the colour comes from that stock's spektrafilm lookup; an unknown stock falls back to a generic tone curve.

The stages, in order

  1. Lens. A little lateral chromatic aberration, red pushed outward and blue inward, 0.4 pixels between them at the corners. That matches a good older 50 mm prime. Then a smooth vignette of 0.35 stops at the corners, the falloff of a fast lens stopped down to around f2.8.
  2. Halation. On film, bright light passes through the emulsion, reflects off the back of the base and comes back as a red orange glow around highlights. The finish models this in linear light: only areas more than 2 stops above mid grey act as sources, and the glow is two soft blurs, 7 pixels and a weaker tail of 12 pixels. That geometry follows from the thickness of the film base, about 127 micrometres. The colour is mostly red, with some green and almost no blue. The centre of each source is protected, so a large white wall stays white instead of turning pink.
  3. Tone curve and colour. For each of the eighteen approved stocks, this step is a colour lookup baked from spektrafilm, a physical simulation of that film and its print paper; the next chapter explains it. Only a prompt without a known stock gets the generic version: a gentle film curve with a soft S, a shoulder that rolls highlights off instead of clipping them, blacks lifted to about 2 per cent and whites capped at about 97 per cent, like a print or scan of a negative, and saturation brought down slightly, to 93 per cent for a mid speed negative.
  4. Softness and edge effect. A blur of 0.5 pixels before the grain, derived from the published sharpness curves of the film stocks plus the lens. Then a wide, weak unsharp mask of 10 per cent at 3 pixels. Real film shows this "adjacency effect" from development: its response rises above 100 per cent at coarse detail, so edges look a little crisper than a plain blur would give.
  5. Grain. Two layers of noise: a fine one of 0.6 pixels and a coarse one of 1.4 pixels at 30 per cent weight. The three colour layers each get their own grain, with only 35 per cent shared between them, and blue is the strongest (red 0.8, green 1, blue 1.5), as the data sheets show for the yellow dye layer. Grain is zero in pure black, peaks in the lower mid tones, falls to half in the highlights and fades out in clipped white. The noise is seeded from the photo's own seed, so the same photo always gets the same grain.

One finding from the research changed the design: at this pixel scale, grain size barely differs between stocks. Individual silver grains and dye clouds are far smaller than one pixel; what a scan shows is their statistical sum, softened by the scanner. Stocks differ mainly in how strong the grain is, not in how big it looks. So the families below vary the amount far more than the size.

Stock families

The finish reads the film stock named in the prompt and picks one of four families. A prompt without a known stock gets a universal setting close to the mid negative.

FamilyStocksCharacter
A, fine negativeKodak Portra 160, Kodak Ektar 100, Kodak Vision3 50D, CineStill 50DFinest grain, clean blacks, full colour
B, mid negativeKodak Portra 400, Kodak Gold 200, Kodak Ultramax 400, Fujicolor Superia 400, Fuji Pro 400H, Agfa Vista 200, Kodak Vision3 250DThe classic colour negative look
C, fast and tungstenKodak Portra 800, Kodak Vision3 500T, CineStill 800TMore and coarser grain, more halation, darker corners
D, slideFuji Velvia 50, Fuji Provia 100F, Kodak Ektachrome E100, Kodachrome 64Deep blacks, more contrast and saturation, fine grain

CineStill films are motion picture stock with the anti halation backing removed, which is why they glow so strongly around lights. They get extra halation on top of their family: CineStill 50D at 0.12, CineStill 800T at 0.20 with wider blurs (9 and 16 pixels) and a lower threshold of 1.5 stops above mid grey. The research could not find a published measurement for this, so I kept the radius close to normal film, because the base thickness does not change, and raised only the strength.

The numbers

ParameterA fineB midC fastD slide
Grain strength (at mid grey, 0 to 1 scale)0.0220.0300.0400.024
Fine grain size, px0.550.60.650.55
Coarse grain size, px, and weight1.3, 0.21.4, 0.31.5, 0.451.3, 0.2
Grain red : green : blue0.8 : 1 : 1.40.8 : 1 : 1.50.8 : 1 : 1.80.9 : 1 : 1.2
Grain shared between layers35%35%30%50%
Grain peak at brightness0.30.30.250.5
Softness before grain, px0.450.50.550.45
Edge boost at 3 px12%10%8%15%
Halation strength0.030.040.050.02
Halation threshold above mid grey2 stops2 stops2 stops1.5 stops
Chromatic aberration at corners, px0.40.40.50.4
Vignette at corners0.30 stop0.35 stop0.5 stop0.30 stop
Black level and white level1.2%, 97.5%2.0%, 97%2.8%, 96%0.6%, 98.5%
Tone curve strength60%60%60%80%
Saturation100%93%92%108%

The black level, white level, tone curve and saturation rows apply only to a prompt without a known stock. When a stock's colour lookup is used, the finish switches its own curve and saturation off, because the lookup already holds them, and it retunes the stages around it: a lighter vignette of 0.15 stop, grain that is weaker, finer and more shared between the colour layers, and a stronger edge boost. The next chapter gives the numbers and the reasons.

The finish takes about two and a half seconds for a 4000 pixel image; the colour lookup itself takes about a tenth of a second, because each stock's lookup is expanded once into a full table. It has one control in the app, the film look, with four positions:

  • Off: no stock colour, grain, curve, halation, lens or softness. The upscaled image is saved as it is.
  • Subtle: every strength at 0.6 times the family value.
  • Normal: the family values above. This is the default.
  • Strong: every strength at 1.4 times.

The JPG is written at quality 95 with full colour resolution (4:4:4, no chroma subsampling), because subsampling softens exactly the fine colour grain the finish just added.

spektrafilm: film colour from physics

The finish got the lens, the halation and the grain right, because those come from measurements. Its weak part was colour. One tone curve and one saturation value per family treat Portra 400 and Gold 200 alike, and no curve reproduces what a real negative does to colour. Portra printed on paper turns a blue sky slightly cyan, pushes lavender a little towards pink and keeps skin warm and dense without burning it. Those shifts are chemistry: how each of the film's three layers responds to the spectrum of the light, how its dyes overlap, how one layer holds back another during development, and how the negative is then printed. A curve chosen by taste cannot know any of that. So I looked for something that models it.

What spektrafilm is

spektrafilm, by Andrea Volpato and earlier called agx-emulsion, is an open source simulation of real colour film. It starts from the published data of each stock: the spectral sensitivity of every layer, the dye density curves, the couplers through which one layer influences another, and the print paper the negative is printed on. Light goes in as a spectrum and is exposed onto the negative, developed, printed and scanned, all in the computer. It knows many of the stocks Filmlab uses by name, including Portra, Ektar, Gold, Ultramax, Vision3 and several Fujifilm films, and it scans slide film directly, without a print, as a lab would.

The code is published under the GPL licence; the stock profiles, and anything baked from them, under Creative Commons Attribution ShareAlike 4.0. Filmlab runs only on my own machines and is never distributed, so both licences are fine for this use, and the credit is kept inside every lookup file baked from it. The colour in these photographs is spektrafilm's work, and I am grateful for it.

The side by side test

I took one clean drawing of a sunlit portrait, upscaled it to 4000 pixels and finished it as Kodak Portra 400 in several ways. The printing paper was Kodak Portra Endura, spektrafilm's default for this film.

  • Our finish, as described in the previous chapter: about 3 seconds. The safest result, with true skin and good highlights, but close to the clean drawing with grain added. None of the Portra colour shifts.
  • The full spektrafilm model, with its own grain, halation, couplers, glare and scanner sharpening: clearly the most like real Portra 400. Skin warm and dense without clipping, highlights rolling off softly, open shadows, the lavender slightly pink, the denim cyan blue, and organic grain. But a whole frame did not fit in the 8 GB memory of the Mac I tested on, so it ran in four overlapping strips: 358 seconds, about six minutes for one photo. For a queue of a hundred photos that is out of the question.
  • The fast path. spektrafilm can bake its colour into a lookup table: a cube of 33 by 33 by 33 colours that records, for each input colour, what the film and the print would make of it. Applying such a cube to a photo takes seconds.

The first baked lookup had the right hues, but the whole frame came out about two thirds of a stop too bright. Sunlit skin went orange and burnt out on the cheek and the nose, and the sky went white. Finding the cause took some digging. The baking tool's single lookup mode ignored the exposure setting and assumed that pure white on screen sits four stops above mid grey, where the full run had used about two and a half. The negative was therefore exposed about one and a half stops over, and the print came out too bright. Darkening the image before the lookup did not help either, because spektrafilm's printing step compensates for exposure, as a real printer does, and cancelled the change.

The fix was to bake the lookup ourselves, through spektrafilm's own programming interface, with exactly the settings of the full run and only its spatial and random parts switched off: the grain, the halation and the sharpening, which cannot live in a lookup table anyway. The cube is then a pixel by pixel copy of the full model's colour. A finer cube of 65 points gave nothing over 33.

To measure how close each version came, I compared it with the full model at 1000 pixels wide, so that grain does not count, as a mean colour difference in Delta E. A difference of about 2 is at the edge of what an eye notices side by side.

VersionDifference from the full model, whole frameOn the faceTime per photo
Our finish7.211.8about 3 seconds
First baked lookup18.524.1a few seconds
Fixed lookup, colour only1.61.4a few seconds
Fixed lookup plus our finish, retuned2.11.8about 6 seconds
Full spektrafilm model00about 6 minutes
The same sunlit portrait finished three ways, as our own finish, the full spektrafilm model and the fast path, with full frames on top and 100 per cent crops of the face below
Kodak Portra 400 three ways: our earlier finish, the full spektrafilm model at about six minutes, and the fast path at a few seconds. Full frames on top, 100 per cent face crops below.

At 100 per cent the face, the lavender, the sky and the denim of the fast path are hard to tell apart from the full model. What the fast path gives up is the full model's own grain texture and a little local contrast that the couplers add during development. Both are covered by our own stages, retuned.

The decision

Every stock gets one 33 point lookup, baked once on the second Mac. All eighteen take about eight seconds to bake. In the finish the lookup becomes the colour step, in exactly the place where the family tone curve and saturation used to sit; nothing else moves. Lens, halation, softness and grain stay ours, on top of it, retuned for this mode on Portra 400:

  • Curve and saturation off, because the lookup holds the stock's own.
  • Vignette down to 0.15 stop.
  • Grain lower (0.020 instead of 0.030 for a mid speed negative), finer, more shared between the three colour layers and fading more towards the highlights. That matches the full model's grain in the sky and on skin; the earlier grain was too coarse and too strong in light areas.
  • Edge boost up to about 22 per cent, standing in for the local contrast the couplers add.
  • Halation ours, as before, because spektrafilm's halation spreads light across the frame and cannot be stored in a lookup. CineStill keeps its extra glow: the Vision3 profiles model the anti halation backing that CineStill removes.

All eighteen approved stocks are covered. Fourteen have a spektrafilm profile of their own; Fujicolor Superia 400 uses the profile of its successor, Superia X-TRA 400. Four are covered by a close relative: CineStill 50D and CineStill 800T by Kodak Vision3 50D and 500T, the motion picture films they are made from; Agfa Vista 200 by Fujicolor C200, as Vista 200 was made by Fujifilm; and Fuji Velvia 50 by Velvia 100. Negatives are printed on Kodak Portra Endura; the four slide films are scanned directly. All eighteen were checked on a contact sheet: plausible colour and no casts. The tungsten stocks come out neutral, because spektrafilm balances each film and paper pair. A prompt without a known stock gets no lookup and keeps the generic curve.

The cost per photo is small. spektrafilm itself runs only to bake the lookups and adds nothing per photo on the second Mac. On the laptop the finish goes from about 3 seconds to about 6 seconds, against six minutes for the full model, whilst drawing and upscaling stay as they were. In a queue paced by drawings of several minutes, the difference does not show.

Two honest limits. The test used one sunlit portrait; night, tungsten light and overcast scenes still need their own side by side. And a lookup has a fixed exposure: unlike the full model it cannot adapt to a drawing that is already bright, so a very light scene on a dense stock can still burn skin.

Post effects

The film finish makes a photo look like good film, well handled. Sometimes I want film that was not well handled: a roll that leaked light, a print that faded in a shoebox, slide film developed in the wrong chemistry. Those are the effects, along with the looks of other cameras altogether: an instant camera, an early pocket digital camera, an early phone. There are seventeen, each with a strength from 0 (off) to 100 (strong, but still a believable photograph). Several can be combined.

Ten of the post effects shown on the same photo: cross processed, bleach bypass, redscale, expired film, faded print, split tone, LOMO, soft glow, light leak, dust and scratches
Ten of the effects, each at a medium strength on the same photograph.
EffectWhat it imitatesWhat it does
Cross processedSlide film developed as a negativeSteep red curve, cyan and green shadows, yellow highlights, about a third more saturation
Bleach bypassSkipping the bleach in the lab, so silver stays in the filmDesaturated by up to half, a contrasty silver layer overlaid, a slight cool steel cast
RedscaleFilm loaded backwards and exposed through its baseEverything turns amber, orange and deep red
Expired filmOld stock past its dateFogged base with lifted blacks, a magenta or green cast strongest in the shadows, uneven density across the frame
Faded printA 1970s print from a shoeboxSofter contrast, matte blacks, dull whites, warm because the cyan dye fades first
Split toneDarkroom toningCool teal shadows and warm amber highlights
LOMOThe LOMO LC A toy cameraDark corners, soft corners, punchy colour, a slight cool cast in the shadows
Soft glowA diffusion filter on the lensHighlights bloom, a light veil lowers contrast
Light leakLight entering the camera through a gapA ragged warm orange to red glow from one of four edges or four corners
Dust and scratchesA scan of a dusty negativeA few of 50 scanned style overlays: specks, hairs, scratches and the odd water spot or fingerprint, mostly light as on a negative, some dark as on the scanner glass
Film burnThe burnt end of a rollHot orange to near white light flaring in from an edge or a corner, from one of eight burn overlays
PolaroidInstant filmSoft milky colours, cool shadows and warm highlights
Polaroid frameAn instant print scanned with its cardOne of 24 frame overlays, described below
Early digitalA pocket digital camera from around 2001Blown highlights, sharpened edges, cool colour, the fine detail of a low resolution sensor
Camera phoneA first generation smartphoneTwo to three megapixels blown up, smeared detail, blocky JPEG compression, blown skies, soft corners
Flatbed scanA home flatbed instead of a film scannerUp to 1.4 pixels of extra softness over the grain, as a flatbed at about 2400 dpi resolves less
Black and whiteBlack and white film on silver gelatin paperPanchromatic tones in place of the colour stock, grey grain, deep blacks

They always run in a fixed order, whatever order you pick them in: colour effects first, then optical effects, then physical artefacts. Most run straight after the upscale; a few belong further down the line. Black and white takes the place of the stock colour inside the film finish, the flatbed scan softens the finished grain as a scanner would, and the dust, the burns and the Polaroid frame go on last, over the grain. That is roughly the order in which these things happen to real film. Each effect draws its randomness from the photo's seed and its own position in the list, so adding a second effect never changes where the first one put its light leak or its dust.

Why after the upscale

This was learnt the hard way. An upscaler is trained to remove noise and to rebuild clean detail. Give it a picture with grain, dust or a soft leak, and it treats all of that as damage: grain turns into a waxy smear, dust specks become little sharp blobs, a soft leak gets an edge. So the order is fixed: the model draws a clean photograph, the upscaler enlarges a clean photograph, and only then are effects and film added, at the final 4000 pixels, where nothing will touch them again.

The effects run on the second Mac, right after the upscale and before the file comes back, because the enlarged file is already there and the laptop is busy drawing the next photo. The film finish then runs on the laptop, last, so its grain lies over everything, including the dust.

That is also why effects never go in the prompt: a model asked for a light leak bakes its own idea of one into the scene, and the upscaler then smooths it.

Presets

The Photo tab has presets that set the sliders in one click. The sliders stay adjustable afterwards.

PresetEffects and strengths
NoneA clean photo, film look only
Toy cameraLOMO 70, light leak 30, dust and scratches 20
70s snapshotFaded print 55, light leak 20, dust and scratches 25
Shoebox findExpired film 60, faded print 40, dust and scratches 50
Lab accidentCross processed 70, expired film 30
Silver screenBleach bypass 60, soft glow 20
DreamySoft glow 60, split tone 30
Redscale burnRedscale 80, light leak 40
Darkroom printSplit tone 50, dust and scratches 20
InstantPolaroid 80, soft glow 15
Home scanFlatbed scan 50, faded print 20

The Polaroid frame

Instant photos, such as those in the Street Polaroids album, are finished with a frame: one of 24 overlays made to look like scans of real instant prints. They follow the true Polaroid 600 geometry, a card of 88 by 107 mm with a square window of 79 mm and the thick strip at the bottom, in classic white, aged cream, slightly yellowed, black and two muted colours. Some show the whole card on the scanner lid; others are cropped tight to the card or to a strip of its border. A few carry a fingerprint, a faint scuff or a small pen or pencil mark.

The photo's seed picks the frame, so the choice looks random across an album, yet the same photo always gets the same frame. Its number and name are recorded in the recipe. The frame goes on last, after the film finish, so the grain stays on the picture and not on the card. Every framed photo comes out the same shape, 4000 by 5000 pixels, as real instant prints are all one size: the picture is fitted into the square window, centred, and the card around it is scaled to fit.

The prompt never asks for a frame. The model draws borders badly, and differently every time, and a drawn frame under a real one would double it. So the prompt describes only the picture inside the square, and the frame is added afterwards, like every other effect.

The upscale

The model draws at about 1.8 megapixels. A photograph worth looking at full screen, or printing, needs more. The upscale takes the drawing to exactly 4000 pixels wide with 4xNomos8kSC, an upscaling model trained on real photographs and released under a Creative Commons Attribution licence. It runs through the open source command line version of Upscayl.

I compared several upscalers on the same images:

UpscalerScoreNotes
4xNomos8kSC8.4 of 10Best: real detail, no invented texture. Kept.
High fidelity 4x8.2 of 10Close, but trained on illustration
Compact LSDIR7.6 of 10Very fast, about 5 seconds, but softer
Siax, RemacrilowerInvent a crackle texture that looks like nothing on film
Real ESRGANlowerSmears detail
Plain Lanczos resizelowerToo soft on faces

The upscale runs on a second Mac on the network and takes about 85 to 90 seconds, which is precisely why it runs elsewhere: it overlaps completely with the drawing of the next photo on the laptop. In a long queue the pace is set by the drawing alone. If the second Mac does not answer, the service falls back to a plain high quality resize on the laptop, so a photo is never lost, only softer, and the recipe records which way it went. Every intermediate file is deleted on both machines once a photo is saved.

The app

All of this runs as a small set of parts on the laptop, plus the second Mac for the heavy enlarging.

The menu bar app starts the service, which holds the queue, serves the web page and drives the render engine on the laptop, sends upscaling and effects to a second Mac, and publishes finished photos to the website
The parts: a menu bar app, a background service with its queue and web page, the headless engine, a second Mac for upscaling and effects, and the website.

The menu bar

Filmlab lives in the macOS menu bar as a small camera aperture icon, with no Dock icon. Starting it starts the background service, which starts the engine when there is work. The menu shows the engine state with its memory use and a queue line such as "37 of 200, about 5 h left". It can open Filmlab, put the model to sleep or wake it, pause or resume the queue, open the output folder, start Filmlab at login, and quit, which stops the service and the engine cleanly.

The web app

The interface is a web page served by the service, reachable only from the laptop itself, and installed in Safari as a web app with its own window and the same aperture icon. Open Filmlab in the menu opens that web app, and adds it to Safari first if it is not there yet. Closing the window stops nothing; the queue keeps running. The page follows the house style of this website, in a day and a night version, in plain English: no "sampler" or "CFG" in the main view, and Settings speaks of "Detail steps". It has three places, Make, Queue and Gallery, and a gear for Settings.

Make

Make has three tabs, Photo, Generate and Upload, under a strip called Now and next: the photo being made, with its stage and a Cancel button, and the next few in line.

Photo has one large field for the description, an optional title, the film look (off, subtle, normal, strong), how many photos to make, the format and the effects with their presets. Asking for several photos makes different takes of the same prompt, each with the next seed. Without a title, Filmlab makes one from the first four meaningful words of the prompt. A new photo can go to the front of the queue or be mixed in among the photos already waiting.

Generate writes prompts without any AI. It holds a library of hand written parts, from people and places to light, cameras and film stocks, and puts them together by the same rules as the rulebook, after which every prompt goes through the same mechanical checker as a hand written one. An optional direction steers it: a single word such as "harbour" or "bikini" is enough, and any ordinary English noun or adjective works, because Generate looks it up in WordNet, an open dictionary of English, and finds the nearest idea it knows. The direction is always visible in the prompt it writes. A secret phrase, stored only as a derived key, drives its randomness, and a record of everything made before means it never writes the same prompt twice, nor one too close to a recent one. The prompts land in an album called Generated, next in line or mixed in.

The Generate tab with a direction field, the number of prompts, the generated prompts listed for review, and buttons to load them next in line or mixed in
Generate turns one direction into many prompts without AI, then loads them next in line or mixed in.

Upload takes a whole list at once: a text file with one prompt per line (a short title and a colon in front names the photo), a spreadsheet file with columns for title, prompt, format and effects, or a structured list, with a preview before anything is added.

The Make page on its Photo tab: the Now and next strip, the description field, title, album, film look, number of takes, seven format tiles, effect presets with strength sliders, and the Next in line option
Make, on the Photo tab: a description, a format, a film look, and optional effects added after the photo is made.
FormatDrawn atSaved at (about)
Wide 16:91792 x 10244000 x 2286
Cinema 2.39:12112 x 8964000 x 1697
Photo 3:21728 x 11524000 x 2667
Portrait 4:51280 x 16004000 x 5000
Square 1:11344 x 13444000 x 4000
Phone 4:31536 x 11524000 x 3000
Phone 3:41152 x 15364000 x 5333

Queue

The queue shows what is being made, what is waiting and what failed. Every waiting photo can be opened and changed in a drawer: its prompt, title, album, format, film look, effects and steps. It can be moved to the front, the back or before another photo, duplicated, or taken out. The photo in progress can be cancelled at any stage, even halfway through its upscale on the second Mac. Failed photos can be retried with one click.

The order is mine to set. New albums are usually mixed in round by round, one photo from each album at a time, so a night of work produces a little of everything rather than one album after another. An album whose name starts with "Test" is a test: it is made like any other, but its photos are saved to a folder of their own outside the gallery, never published, and forgotten by the queue once they are done.

The Queue with the photo in progress and its stage, the waiting photos filtered by album and state, and the drawer open to edit a waiting photo
The queue: the photo being made, the next ones waiting, each one editable in a drawer.

The queue is stored in a small database, so it survives a restart of the service or the laptop. A photo that was in progress when the service stopped goes back to waiting. Pause also survives a restart: a paused queue stays paused until I resume it. Drawing happens one photo at a time; upscale, effects and finish of the previous photo run alongside. The time estimate comes from the durations of the last photos, not from a guess. Whilst there is work, the laptop is kept awake; if a sleep time is set in Settings, the model goes to sleep after that much idle time to free memory. A gentle mode lets Filmlab step back whilst I am using the laptop myself: it runs at background priority and rests between photos. I keep it switched off, so the queue always runs at full speed.

A battery guard looks after the laptop itself. Its charger cannot always keep up with a night of drawing: on one long run the battery fell from full to a fifth whilst plugged in. So before each photo the service reads the battery. Below 30 per cent, or when the charger is unplugged, it finishes the photo in hand and waits; once the battery is back at 80 per cent on the charger, the queue carries on by itself. If the charger is out, the Mac is allowed to sleep whilst it waits.

Gallery and viewer

Photos are grouped in albums, seventeen of them at the time of writing, with about 570 photos made and 450 more in the queue: from Party selfies, Street Polaroids and Boring iPhone Photos to Silver Gelatin, Hotel Rooms, Weather Report and Atlas, a National Geographic style tour of every country. Every photo in the queue is assigned to an album, new or existing, and its file is kept in a folder of that name; moving a photo to another album moves the file with it.

The gallery shows the finished photos, newest first. A photo with versions shows as one tile with a small badge. Photos can be selected in groups to download or move to the Trash. Nothing is ever deleted outright; it goes to the macOS Trash. There is a full screen slideshow with a choice of 4, 6, 10 or 20 seconds per photo, shuffle, and an inspect mode with 100 and 200 per cent zoom and a loupe that follows the pointer, for checking grain and hands at real pixel size.

The Gallery with the album choice, a grid of finished photos with version badges, and buttons for select, show in folder and slideshow
The gallery: albums to choose from, one tile per photo, versions stacked under it.

Opening a photo shows it large, with three tabs. Prompt shows the description. Post-processing shows the effects and their strengths, where they ran, the film look and stock, the upscaler and its time, the final size and quality, and the copyright. Model shows the model, steps, guidance, sampler, shift, seed, drawing size, drawing time, total time, engine version and photo version. From here a photo can be made again: same prompt, new seed.

The photo viewer with the photo large, version arrows, and the Prompt, Post-processing and Model tabs
The viewer reads everything in its three tabs from the recipe stored inside the JPG.

The recipe in every file

Every JPG carries its complete recipe inside the file itself. Not in a database next to it, not in a sidecar file: in the photo. If the file is copied to another disc, sent by email or archived, the recipe goes with it.

What lives inside each JPG: title, prompt, date, copyright and AI source marker in the standard fields, and the full recipe with model, engine, seed, steps, sampler, effects, film finish parameters, upscale and timings
What lives inside the JPG: standard fields that every photo app shows, and the full recipe for Filmlab itself.

The recipe is a structured record stored twice: in the EXIF user comment, and as the same text in the XMP metadata, which a web browser can read straight from a picked file. It holds:

  • the prompt, title, album, format and version, and which photo it was made from;
  • the model, text encoder and VAE, each with file size and a fingerprint (a SHA 256 hash), and the exact version of the engine source;
  • seed, steps, guidance, sampler, shift and drawing size;
  • the effects with their strengths and seed;
  • the film look, the stock it detected, the family, the colour lookup it used, and every finish parameter exactly as it ran;
  • the upscaler and target width, and for an instant photo the Polaroid frame with its number and name;
  • timings: queued, started, finished, and the seconds spent per stage.

The standard fields that Photos, Lightroom and Finder show are filled too: title, the prompt as description, the creating tool, the date, a version number, the creator and copyright with the year, and the IPTC marker that says the image was made by a trained algorithm. That last one matters to me: these photos look like film, and the file should say plainly what they are. The copyright holder is a setting; changing it rewrites the copyright in every photo already made. Photos from before the recipe existed were given one afterwards, rebuilt from the known history and marked "partly reconstructed".

Fill from a photo, and versions

The recipe makes one feature possible that I use more than any other. On the New photo page, Fill from a photo lets me pick any Filmlab JPG. The browser reads the recipe straight from the file and fills in the prompt, format, film look and effects. An option keeps the same seed and steps, so a small change in the prompt keeps the same picture with that one thing different: a different jacket colour, a lower sun, another film stock.

The result becomes the next version of the original, named with "v2", "v3" and so on. In the gallery the versions stack under one tile, and the viewer steps through them with the arrow keys. Moving a newer version to the Trash shows the previous one again.

There is also a re-render that replaces the original instead of adding a version, for example to add effects to a photo already made, or to redraw it with a better prompt. It takes the original's file name and date, in the name and in the photo's own date fields, so the photo keeps its place in the timeline, and the old file goes to the Trash. With a new prompt, the recipe inside becomes the new one entirely.

Finished files are named with the date in front, such as "20261018 Hamburg Chimney Sweep.jpg", so they sort by day in any folder. Titles use letters, digits and single spaces only. A duplicate title gets a number added.

Publishing to this website

The photos you see on the Filmlab page of this site are published by Filmlab itself, not by the website build. The website shows only this article and the gallery; none of the software goes online.

Publishing is a choice per photo. In the Filmlab gallery every photo has an On website tick, for one photo or a whole selection at once. New photos are ticked as they are made, photos in a test album never are, and only ticked photos go online. Unticking a photo, or moving it to the Trash, takes it off the website again.

The work is split the same way as the rest of the pipeline. The laptop only exports the ticked photos. The second Mac on the network does everything else: it makes all the web copies, cleans the recipe in the published original, and uploads only what changed. It starts about 20 seconds after a change, so a burst of ticks becomes one publish.

VersionSizeFormat and qualityUsed for
Grid tile330 and 660 px, squareAVIF quality 60, WebP quality 80The gallery grid, picked by screen density
View1024, 1600 and 2560 px wideAVIF quality 78, WebP quality 85The viewer, picked by screen size
Placeholder24 px wide, about 100 to 230 bytesWebP, inside the manifestShown whilst the photo loads
Original4000 px wideJPG, quality 95The full file, for those who want to look closely

AVIF is the main format; WebP is the fallback for browsers without it. Every AVIF is encoded with full colour resolution (4:4:4) at 8 bit, with the encoder tuned for image quality ("tune iq"); every WebP uses sharp colour conversion. A small manifest that the gallery reads, newest first, lists each size a photo has, so the gallery never assumes a width and the sizes can change later without touching the page.

The quality settings were measured, not guessed. These photos are full of fine grain, which is hard for any encoder. At 1600 px, AVIF at quality 75 tuned for image quality came to 177 KB and scored 78.9 on SSIMULACRA2, a perceptual quality score. The same quality tuned for SSIM came to 163 KB but scored only 74.7. Quality 80 tuned for image quality reached 81.5 at 223 KB. Quality 78 for the viewer sits just below that, at a score of about 80, where the grain is kept. A visitor scrolling the grid loads about 15 to 55 KB per tile.

The gallery offers a choice of albums. Each album can be viewed on its own, newest first. "All" shows every album together, in one of two orders: Mixed, a fresh random order on each visit, so that a first look samples everything rather than only the latest set, or Latest, newest first. The choice is remembered for the next visit.

Whilst a photo loads, its placeholder stands in: a tiny image only 24 pixels wide, 24 by 14 for the wide format, of about 100 to 230 bytes, carried inside the manifest. The browser is told not to smooth it, so it shows as a grid of hard colour blocks rather than a blur, a coarse mosaic of the photo's colours that the real image then replaces.

The published original keeps its recipe and its copyright, but the recipe is cleaned first: anything that would reveal my machines, network or folders is taken out. The prompt, the model settings, the effects, the film parameters and the timings stay, so anyone can see exactly how a photo was made.

The photos live in their own folder on the web server, which a website deploy never touches. Publishing a photo therefore never needs a rebuild of the site, and a rebuild never removes a photo. When a photo is replaced or taken offline, its old web copies are removed from the server in the same publish.

Every setting in one table

StageSettingValue
ModelImage modelFLUX.2 [klein] 9B, 8 bit integer, about 9.2 GB
ModelText encoderQwen3 8B, 8 bit, about 8.4 GB
ModelVAEFLUX.2 VAE, about 0.2 GB
DrawingSteps8, and 20 for a photo with quoted words (4 before the step test)
DrawingGuidance (CFG)1, so the negative prompt is ignored
DrawingSamplerDDIM Trailing
DrawingShift3, resolution dependent shift off
DrawingSeedRandom, or kept from a photo when making a version
DrawingSizes1792 x 1024 wide, 2112 x 896 cinema, 1728 x 1152 photo, 1280 x 1600 portrait, 1344 x 1344 square, 1536 x 1152 phone, 1152 x 1536 phone upright
DrawingTimeAbout 2.5 to 4 minutes at 8 steps once the chip is warm, about twice that at 20
EngineSourceDraw Things community engine, built from source, run headless
EngineModel in memoryLoaded per photo, files kept in the system file cache
EngineWarm upOne tiny 1 step drawing at start, discarded
EngineSleep after idleA setting in minutes; off by default, set to 15 here
UpscaleModel4xNomos8kSC through Upscayl, on a second Mac
UpscaleTargetExactly 4000 px wide
UpscaleTimeAbout 85 to 95 seconds, overlapping the next drawing
UpscaleFallbackPlain high quality resize on the laptop
EffectsChoiceSeventeen effects, strength 0 to 100 in steps of 5, eleven presets
EffectsWhere and whenMost on the second Mac, after the upscale, before the finish; black and white and flatbed scan inside the finish; dust, scratches, burns and the Polaroid frame last
FinishFilm lookOff, subtle (0.6x), normal, strong (1.4x)
FinishStock detectionFrom the stock named in the prompt, four families plus universal
FinishColourOne 33 point spektrafilm lookup per stock, baked once; 18 stocks, 14 with their own profile and 4 by a close relative; negatives printed on Kodak Portra Endura, slides scanned directly; generic curve only for an unknown stock
FinishWith a lookupOwn curve and saturation off, vignette 0.15 stop, weaker and finer grain, edge boost about 22 per cent
FinishTimeAbout 6 to 10 seconds with the lookup, the lookup itself about 0.1 s
FramePolaroid frameFor instant photos: one of 24 overlays in Polaroid 600 geometry, picked by the photo's seed, added after the finish, every framed photo 4000 x 5000, recorded in the recipe
MarksDust and burns50 overlays at 4096 px (20 dust, 14 scratches, 8 marks, 8 burns), a few picked per photo by its seed, on a minority of photos
OutputFileJPG, quality 95, 4:4:4, date and title as file name
OutputMetadataFull recipe in EXIF and XMP, standard title, description, copyright and AI source fields, and a note for every revision
QueueOrderOne drawing at a time, post steps overlapping
QueuePersistenceSurvives restarts, pause included
QueueAlbumsEvery photo in an album, with a folder of its own on disc
QueuePhotos per prompt1 to 50, each the next seed
QueueKeep awakeOn whilst working
QueuePlacingNext in line or mixed in; any waiting photo can be edited, moved or duplicated, and the photo in progress cancelled
QueueTest albumsAlbums named "Test": saved outside the gallery, never published
QueueBattery guardWaits below 30 per cent or when unplugged, carries on at 80 per cent on the charger
QueueGentle modeBackground priority and rests between photos whilst I use the laptop; switched off here
PromptStandardSix sentences, 70 to 110 words (up to 155 for a group of four), every object fully specified, no negations, no effects, one exact film stock
PromptGenerateWithout AI: hand written parts combined by the rulebook, a direction from any English word through WordNet, never the same prompt twice
PromptTextOne to three quoted lines of up to three words, wording a real person would write, no camera brand nearby
PromptPeople spreadPer set: about 30 per cent toward the camera, 20 looking down at what they hold, some from behind; a laugh in at most one in six; twelve tested everyday actions
PromptCheckMechanical check plus a 47 question checklist, before the prompt is queued
DrawingFace guardYuNet face detector on every drawing of a person, before the upscale; new seed on a doubled head or extra face, at most three attempts, then the photo fails
DrawingText guardText recognition built into macOS reads every drawing with quoted words; new seed when a word is missing or misspelt, at most three draws, then the best draw is kept
WebsiteChoice"On website" per photo or per selection, on by default for new photos, never for test albums; unticked or deleted photos are removed
WebsiteAlbumsA choice per album, newest first; "All" in a fresh random order per visit or newest first, remembered
WebsiteWeb versionsSquare tiles 330 and 660 px, views 1024, 1600 and 2560 px, 24 px placeholder, original 4000 px JPG at quality 95
WebsiteFormatsAVIF (tune iq, 4:4:4, 8 bit, quality 60 tiles, 78 views), WebP fallback (quality 80 and 85, sharp YUV)
WebsiteWhenAbout 20 seconds after a change, only changed files uploaded

What I would do next

  • A wider automatic check. The face guard only looks at faces, and the text guard only at words. A local vision model could look at each finished photo for the other known failures, such as extra fingers, fused objects, stray lettering and floating hats, and flag it before I see it.
  • The lookup on more scenes. The spektrafilm lookups were compared with the full model on one sunlit portrait. Night, tungsten light and overcast scenes deserve the same side by side, and the creative effects should be checked on top of the stronger film colour.
  • The full model for a single photo. For one photo that matters, the full spektrafilm model with its own grain could run overnight on the second Mac, in strips, at about six minutes a frame.
  • Halation measured, not reasoned. The CineStill numbers are the least certain in the finish, because no published measurement was found. Photographing point lights on real CineStill 800T and measuring the glow would settle it.
  • Prints. At 4000 pixels the files are large enough for a good print. Printing a set and comparing it next to real film prints is the honest test of whether the finish is right.

The lesson I take from building Filmlab is that the realism did not come from the model alone. It came from the order of the stages, from prompts that leave nothing to guess, and from film numbers taken from data sheets instead of from taste. The model draws the scene. Everything that makes it look like film is decided afterwards, on purpose.