Turns an oblique 3D map render into a warm pixel-art city: warm late-morning light, cool violet shadows, coloured outlines, lush layered tree canopies. It paints with the distilled FLUX.2 klein 4B in 4 steps, about 20 s per 1024 px frame on an RTX 4090. FastCello painted the cities of Mini World: Brasília, Recife, Manaus, Florianópolis, Fortaleza, João Pessoa, Belém, São Luís and São Paulo.
Image-to-image LoRA: 3D render in, painting out. Training log, rounds and scores: marceloeduardo.com/pixel-lora-training.html (FastCello log).
Recife, painted by this LoRA (1:1 pixels).
import torch
from diffusers import Flux2KleinPipeline
from PIL import Image
pipe = Flux2KleinPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-4B", torch_dtype=torch.bfloat16).to("cuda")
pipe.load_lora_weights("handful/fastcello-flux2-klein-4b")
render = Image.open("render.jpg").convert("RGB") # 1024x1024 oblique 3D render
out = pipe(image=render,
prompt="Repaint this 3D map render as mgwarm warm pixel-art map, keeping every road, building and tree in place",
width=1024, height=1024, num_inference_steps=4, guidance_scale=1.0,
generator=torch.Generator("cuda").manual_seed(0)).images[0]
out.save("painted.png")
For whole cities we paint every frame from a 1536 px window of the render mosaic (the frame plus its neighbours) and keep the middle, so neighbouring frames join without seams.
Trained on FLUX.2 klein base 4B with diffusers' klein image-to-image LoRA trainer, then used on the distilled 4-step model: rank 16, 1024 px, random flips, 2,500 steps, on pairs of (oblique 3D render of a map frame → the same frame painted in the warm pixel look by Codex) from Brasília, Recife, Manaus and Florianópolis.
On 16 held-out frames, LPIPS against the Codex paintings (lower is closer): 0.40 on land when painted in 4 steps. Painted the slow way (base model, 28 steps) it is closer still (0.39 overall). A second Codex painting of 12 of the land frames scores 0.34 against the first, which is about the ceiling of this measure. Per-round numbers are on the log page.
black-forest-labs/FLUX.2-klein-4B