Research & Implementations

How these systems are built

The case studies say what shipped. This is the layer underneath: the pipelines drawn stage by stage, what each model is actually doing at that stage, and why the pieces are arranged the way they are.

Every build they come from is on Work, and the papers and models behind them are in the Library.

Development overview

How these systems are actually put together

Every diagram below is drawn from the project it describes — the stages, the models kept and the models discarded, the stores, and the gates that stop a bad output reaching anybody. Nothing here is a stock architecture picture.

  • boundary Something entering or leaving the system
  • model A neural network doing inference
  • service Deterministic code — an API, a worker, a routine
  • store A database, cache or vector index
  • gate A decision, a validation or a human checkpoint

Chimera Studio

Read the case study

Chimera Studio — inference

One photo and one sentence in, gallery-grade frame out, under 10s

Chimera Studio — inference — One photo and one sentence in, gallery-grade frame out, under 10s The request path is a staged pipeline, not a single model. A mobile client posts a source photograph and a free-text editing instruction. SegFormer segments the product region so the garment can be held fixed. ControlNet derives edge and depth priors from that mask. The request is then routed by edit type: garment edits go to InstructPix2Pix, background-only synthesis goes to Stable Diffusion XL — both latent diffusion models, and the split was settled by an A/B test. Real-ESRGAN, a GAN-based super-resolution network, upscales the result and removes artefacts. The finished frame is returned as a signed S3 URL. Repeated prompt and image pairs are served from a Redis cache instead of re-running the chain. Request 01 · boundary Photo + text prompt Instant editing from a sentence — "clean white studio, 45° key light" iOS / Android over REST 02 · store Redis cache Seen this prompt and image before? Return, do not re-infer hit -> straight to the signed URL Understand the product 03 · model SegFormer Semantic segmentation isolates the product region 04 · model ControlNet Edge + depth priors derived from the mask constrain generation Generate — latent diffusion 05 · gate Route by edit type An A/B test settled the rule; requests dispatch on the edit, not the model Garment edit InstructPix2Pix Instruction-following edit inside the constrained region Background Stable Diffusion XL Background synthesised around the held-fixed product, 1024px+ Finish — GAN super-resolution 06 · model Real-ESRGAN A GAN, not a diffusion model: upscale and artefact removal only Deliver 07 · boundary Signed S3 URL Preview and download on the device

Stateless API on AWS Lambda in front of GPU workers on g4dn instances. 1080p standard, 4K optional; under 10s per image.

Inside the generation stage

Latent diffusion does the editing. A GAN does the upscale. They are not the same thing and they are not the same stage.

Latent diffusion pipeline with a separate GAN super-resolution stage Three inputs are encoded in parallel: the source photograph goes through a VAE encoder into a compressed latent, the SegFormer product mask goes through ControlNet to produce edge and depth maps, and the text prompt goes through the CLIP text encoder to produce token embeddings. Inside latent space, a noised latent z-T is passed to a U-Net denoiser which predicts the noise present at each timestep. The text embedding conditions the U-Net through cross-attention; the ControlNet output is added as residuals into the U-Net encoder and middle blocks. A scheduler step turns the prediction into z-t-minus-one, and that loop repeats for T timesteps until a clean latent z-zero remains. Only the reverse, denoising direction runs at inference; the forward noising process exists during training. The VAE decoder returns the clean latent to a full-resolution RGB image. Finally, and separately, Real-ESRGAN — a generative adversarial network, not a diffusion model — performs super-resolution and artefact removal on that image. Pixel space — what the client sends Source photo from the client SegFormer mask product region Text prompt edit instruction VAE encoder pixels to latent ControlNet edge + depth maps CLIP encoder token embeddings Latent space 64×64×4 Diffusion z_T ~ N(0, I) U-Net denoiser ε_θ(z_t, t, c) — predicts the noise in z_t text embedding enters by cross-attention; ControlNet residuals add into the encoder and middle blocks scheduler step z_t-1 × T reverse steps z_0 — clean latent, t = 0 VAE decoder latent to RGB, 1024px and above GAN Real-ESRGAN super-resolution + artefact removal, adversarially trained

Forward vs. reverse. Diffusion has two directions. The forward process q(z_t | z_0) progressively adds Gaussian noise and exists only to create training targets. Inference runs the reverse process only: start from noise, and have the U-Net predict and subtract that noise T times. Nothing in the request path re-noises an image.

Two model families, one pipeline. SDXL and InstructPix2Pix are latent diffusion models. Real-ESRGAN is a GAN and does super-resolution after diffusion has finished. They are drawn apart on purpose.

Chimera Studio — data & training

How the pipeline earned the right to be trusted

Chimera Studio — data & training — How the pipeline earned the right to be trusted A five-stage data and training programme. Ten thousand or more product photographs are collected across clothing, accessories, pants, shoes, caps and belts, each shot from multiple angles. Every image is annotated by hand with bounding boxes for the product region, segmentation masks for folds and shadows, and background category plus light direction. Augmentation — brightness, contrast, rotation and perspective — simulates shooting conditions the source set never covered. A held-out set of photographer-approved edits is withheld as an acceptance gate: no model revision ships unless it clears that set. Fine-tuning then adapts InstructPix2Pix to the garment set, and only then does the inference pipeline go live. Data 01 · boundary Collection 10,000+ product images, multiple angles per item clothing · pants · shoes caps · belts · accessories 02 · service Annotation Manual, per image — this is where the supervision comes from bounding boxes segmentation masks light direction + background class 03 · service Augmentation Brightness · contrast · rotation · perspective covers shooting conditions the source set missed Acceptance 04 · gate Held-out ground truth Photographer-approved edits, withheld from training a revision that fails the gate does not ship Training 05 · model Fine-tune + select InstructPix2Pix adapted to the garment set; SDXL used as shipped PyTorch · Hugging Face Diffusers 06 · service Promote to inference Only weights that cleared the gate reach the request path

The acceptance gate is the point of the whole programme: model selection is decided by held-out photographer-approved comparisons, not by eyeballing samples.