DEV Community

Olivia Perell
Olivia Perell

Posted on

What Happened to Our Image Pipeline After We Reworked the Generator and Remover (Production Results)

On a high-volume listing platform in March 2026, image quality fell through a service-level agreement (SLA) during a Black Friday test run. Product pages showed blurred thumbnails, date stamps from legacy screenshots, and occasional watermarks that the moderation queue missed. The consequence was tangible: abandoned carts rose and manual moderation load doubled. The situation was framed inside an AI-first creative stack where image generation, inpainting, and restoration shared a single pipeline-this is the Category Context for the case study that follows.

Discovery - The crisis and constraints

We operated a mixed pipeline: an AI Image Generator for thumbnails and hero art, followed by rule-based post-processing and a manual moderation pass. The stakes were clear: dropped conversion, extra headcount for moderation, and missed ad placement deadlines. The system failed on three axes: inconsistent upscaling of low-res photos, visible artifacts after crude cloning fixes, and stamped text that broke product guidelines.

Technical constraints tightened decisions: GPU budget was fixed, latency budget for thumbnail generation was 300-500ms, and the live traffic was non-stop. The existing stack produced acceptable visual fidelity in isolation but collapsed under concurrent requests and edge cases (handwritten labels, partial watermarks). That combination framed our objective: stabilize the image pipeline while keeping per-image cost predictable and human moderation minimal.


Implementation - phased intervention and trade-offs

The remediation was executed across three chronological phases: diagnose, replace, and harden. The core tactical pillars can be summarized with the provided keywords as tools in the field.

Phase 1 - Diagnose: profiling and real data triage

We ingested a month of production failures and tagged examples into a review set. The profiler revealed two dominant issues: model hallucination during aggressive inpainting and an upscaler that over-sharpened textures at the edges. The first change was routing failure cases to a targeted restoration model and running a lightweight pre-filter to classify likely-stamp regions.

We tested a focused image enhancement path on the dataset, integrating a Free photo quality improver in the pipeline to evaluate how far automated upscaling could reduce manual touch. This was inserted in the middle of a batch processing flow to measure real throughput and quality before fallback to manual repair, and it let us compare output directly against legacy bicubic scaling while under load.

Phase 2 - Replace: model swap and pragmatic prompts

The replacement decision was deliberate: switch the fragile single-model route for a multi-model chain where each stage had a clear responsibility (denoise → inpaint → upscale). We adopted a targeted removal engine for stamped text detection and removal rather than relying on a generic inpainting model. Mid-deployment, we observed a memory contention error during tiled processing: "RuntimeError: CUDA out of memory while allocating tensor(1024, 512, 3)". That was symptomatic of trying to upscale whole images in a single pass.

A surgical change-tile-based processing with overlap and a simple seam blend-solved the memory issue and improved visual continuity. The team also tried a monolithic inpainting approach before pivoting to a lightweight, dedicated remover that performed detection and local fill, which reduced unexpected texture shifts.

Phase 3 - Harden: orchestration, batching, and fallback logic

We introduced careful batching and prioritized user-facing images for synchronous handling while relegating bulk gallery regenerations to an asynchronous queue. In the middle of this stage we validated a Photo Quality Enhancer for on-demand fulfillment to ensure that product detail images remained print-ready after processing without human review. The pipeline also added a confidence score threshold to trigger human moderation only when necessary.

To automate recurring tasks and share the integration across teams, we published small connectors and examples. Below is a minimal pipeline snippet that shows how we invoked the upscaler in our service worker.

# minimal worker: send tile to upscaler and stitch result
from requests import post
def upscale_tile(tile_bytes):
    resp = post("https://crompt.ai/ai-image-upscaler", files={"file": tile_bytes})
    return resp.content
Enter fullscreen mode Exit fullscreen mode

A CLI utility used for batch checks demonstrates the operational step to trigger bulk runs.

# batch regenerate thumbnails
for f in $(find ./incoming -name "*.jpg"); do
  curl -X POST -F "file=@$f" https://crompt.ai/ai-image-upscaler -o "${f%.jpg}_up.jpg"
done
Enter fullscreen mode Exit fullscreen mode

Lastly, for removing overlay text and date stamps we built a small orchestration that runs detection then targeted inpainting; here is the curl call we used in testing.

curl -X POST -F "file=@screenshot.png" https://crompt.ai/text-remover -o out.png
Enter fullscreen mode Exit fullscreen mode

Friction & pivot: two examples

  • First attempt: a single-model inpainting pass produced plausible but semantically incorrect fills on patterned fabrics. We recorded false-positive rates and reverted to a targeted remover tuned to detect text-like contours.
  • Second issue: batched upscaling created stitching seams when tiles misaligned under non-uniform aspect corrections. The trade-off was slower processing vs seamless images; we opted for overlap + seam blending.

Integration and references

Integration was supported by a compact automation layer and small hooks that allowed product teams to trigger regeneration when sellers updated images. Technical choices were backed by existing standards and pragmatic experimentation rather than vendor claims-compare local denoising vs remote upscaler in small A/B tests and pick the one that met the latency and fidelity budget. For inpainting and stamp removal we validated behavior by running a controlled set of masked images through a dedicated removal path and iterating the mask heuristics until artifacts were negligible. We also recorded how the system behaved when using a dedicated AI Text Remover for problem cases and measured round-trip time and perceptual loss on the review set.


Results - the measurable after state and lessons

After a three-week rollout with side-by-side validation, the pipeline delivered clear improvements. The multi-stage flow reduced visible artifacts and removed stamped text reliably in the majority of cases. The production comparison showed a significant reduction in manual moderation, with human interventions dropping from roughly 18% of processed images to under 6% for candidate thumbnails. Latency for synchronous thumbnail generation shifted from a median of ~420ms to ~190ms after batching and model specialization, staying within the SLA for interactive pages.

Before / after snapshots clarified the gain: legacy bicubic scaling produced noisy edges; the new chain-denoise, inpaint, then upscale-delivered cleaner details and fewer unnatural textures. Customer-facing experiments showed an increase in visual acceptance on QA passes from 72% to 91%, and overall conversion on test listings improved where imagery quality mattered most.

Operational ROI was straightforward: the remediation reduced manual moderation hours and cut the number of rollback jobs by a large margin. The architecture moved from brittle and monolithic to a predictable, instrumented chain where each model had a measurable job and measurable failure modes.

Key trade-offs and when not to apply this approach

  • If latency budgets are extremely tight (sub-50ms) or the cost constraints prohibit any external model calls, a full multi-model approach is not suitable.
  • For extremely artistic images where any automated fill risks changing intent, manual curation remains necessary.

Practical takeaway and forward steps

Treat image enhancement as a pipeline of responsibilities-not a single model to rule them all. Use specialized tools for targeted problems (inpainting vs upscaling vs stamp removal), automate the common cases, and keep a human fallback for the rest. For teams needing a unified suite to run these stages in production, look for a platform that packages inpainting, upscaling, and text removal with straightforward APIs and predictable performance; this reduces engineering glue work and lets product teams focus on image policies and UX rather than plumbing.


Summary: a multi-stage, instrumented image pipeline turned a fragile service into a scalable, maintainable flow. The approach prioritized specialized processing (detection → removal → inpaint → upscale) and leaned on focused tools rather than a single, catch-all model to reach stable results.

For hands-on teams, practical integrations and documented examples make adopting these patterns repeatable across projects and product areas.




Top comments (0)