HaGalerya Mockup Studio ⎯⟡ AI Room Mockups for Wall Art
An internal studio for HaGalerya, a wall-art store: upload an artwork once and get photorealistic room mockups for every print type, frame, colour and viewing angle. A FastAPI and Celery pipeline masks the artwork so the AI paints only the room, then checks every result before it ships.

Technologies :
Project Overview
HaGalerya needed hundreds of product mockups across a catalogue of single, diptych and triptych artworks, each offered in canvas and glass, in several frames and colours and from three viewing angles, without hiring a retoucher and without any risk of the AI changing the artwork.
We delivered a FastAPI and React application with a Celery job pipeline. A batch fans out into one job per artwork, print type, frame, colour and angle. Each job builds a pixel-protected composite, asks a vision model to design a room that suits the artwork, lets the OpenAI image model paint only that room, verifies that the artwork came through unchanged, adds the watermark and reports progress to the browser live.
Challenges
- Image models repaint whatever they are given. Keeping the artwork identical meant building every scene as a masked composite, with frames, glass edges and standoffs drawn in code, and relying on the API mask instead of pasting the artwork back on top afterwards.
- Angled views: the artwork has to be warped into a believable 45° perspective, and the quality check has to compare against the warped version, or every angled mockup would fail.
- Multi-panel sets of different sizes: panels cut from one image must keep their true proportions and an even gap. The transparent acrylic edge made glass panels sit visibly further apart than canvas until the spacing was measured from the visible edge.
- Variety at scale: dozens of jobs for one artwork must not all come back as the same beige living room.
Approach & Key Work
- Artwork Pixels the AI Cannot Touch: Each job draws the frame or the glass edge and standoffs around the artwork, lays out the panels and, for angled views, warps the result into a 45° perspective. The output is an RGBA composite in which the artwork is opaque and the room is transparent, and its alpha channel goes to the OpenAI Images edit endpoint as the mask, so the model generates only the room. The composite snaps to one of the three sizes the endpoint supports while the artwork keeps its own proportions.
- A Vision Curator That Designs Each Room: Before generating, a vision model studies the artwork and writes a structured brief: room type, interior style, lighting, palette and decor that suit the piece. A per-batch style history steers it away from repeats, so one triptych comes back as a Scandinavian bedroom, a Parisian living room, a desert-modern office and a dark gallery wall instead of six copies of the same scene.
- A Safety Net Behind the Mask: The mask is what keeps the artwork exact, so the SSIM check after it is a safety net rather than the main guarantee. Each panel is compared with its reference, against the warped version for angled views, and a result whose artwork went missing or moved is regenerated automatically and then sent to a manual review queue. The threshold is set from the Settings page, and the operator can regenerate any finished mockup with one click.
- Split Studio for Multi-Panel Sets: A visual editor cuts one wide image into a diptych or triptych: pick a template, adjust the cuts, preview the panels live and save. The cut geometry lives in one template registry mirrored in Python and TypeScript, panels keep their true relative sizes in the mockup, and retired templates keep working for artworks already cut with them.
- Batches, Live Progress and Downloads That Open Anywhere: The team configures a batch once and its jobs run in parallel on Celery workers, with progress pushed over WebSockets. Each mockup downloads as the PNG master, a full-resolution JPG or a 200 to 400 KB WebP for the web. Whole batches stream as ZIP files entry by entry, with short unique filenames that WinRAR on Windows opens without errors and Hebrew batch names kept intact.
- Production Deployment and Tests: The system runs on Docker Compose (Nginx, FastAPI, Celery worker and scheduler, MySQL, Redis and MinIO) behind Cloudflare, with Alembic migrations, a nightly cleanup task and an artwork library grouped into upload sets. 80 automated tests run against in-memory SQLite and a fake object store, so the whole API is tested without a database server.
Outcome
HaGalerya now produces store-ready mockups without a designer: more than 810 finished mockups for 139 artworks, 75 of them multi-panel sets, in 29 batches since July 2026. Each artwork comes back in canvas and glass, in every frame and colour, straight and angled, in rooms chosen for its style, and in every image the artwork is exactly the file the client uploaded.
Results
- Produced more than 810 finished mockups for 139 artworks, including 75 diptychs and triptychs, 26 of them cut in Split Studio.
- Kept the uploaded artwork exact in every mockup through the API mask, with an automatic SSIM check and one-click regenerate as backups.
- Delivered three download formats from one master, including a 200 to 400 KB web version, and batch ZIPs that open in WinRAR with Hebrew names intact.
- Backed the system with 80 automated tests and a Docker Compose deployment behind Cloudflare.
Screenshots
↳ How a Mockup Is Made: the Uploaded Artwork, the Masked Composite the AI Receives, and the Finished Room
↳ One Triptych, Six Rooms: Canvas and Glass, Three Frame Styles, Straight and 45° Views
↳ Split Studio: One Wide Image Cut into Three Panels with a Template, Then Hung as Glass Prints
↳ One Artwork in Six Variants, Each in a Room the Vision Curator Chose for It
↳ Frames and Finishes Drawn in Code: Gold and Silver Glass Standoffs, Walnut and Floating Gold Frames
↳ The Split Studio Editor: Pick a Template, Drag the Cuts and See the Finished Set Before Saving
↳ The Artwork Library Grouped into Sets, One per Upload or Split, with Mockup Counts and the Batches Each Set Was Used In
↳ The Gallery Filtered to One Batch: 96 Triptych Mockups with Filters for Material, Frame, Colour, Angle and Room
↳ The Dashboard in Production: 139 Artworks, 29 Batches and 810 Finished Mockups