In March 2026 a product team responsible for the marketing assets pipeline hit a hard plateau: automated image generation, cleanup, and upscaling could not keep pace with weekly campaign demands. The system produced high-fidelity visuals but required heavy manual touch-ups, missed delivery windows, and threatened campaign launches. As the senior solutions architect accountable for delivery, the brief was simple and brutal - restore throughput and reduce manual edits without inflating cost.
Discovery
The visual pipeline combined a general-purpose image model with a brittle post-processing stage that relied on handcrafted scripts. Two clear failure modes emerged: (1) overlaid text and watermarks that the generator introduced inconsistently, and (2) small objects and photobombs that the cleanup scripts failed to remove without creating blur or texture mismatch. The Category Context - an "AI Image Generator" driven creative workflow - framed the problem: the team needed generation, selective element removal, and quality enhancement to behave like a single, dependable toolchain in production.
A quick audit showed the old flow scored high in creative variety but low in operational stability. Image deliverables required manual editing for roughly 28% of outputs; designers spent 1.6 full-time equivalents on patching and upscaling. The objective became pragmatic: reduce manual fixes, keep creative control, and maintain per-item cost parity.
Implementation
The intervention was staged in three phases: pilot, hardening, and rollout. Each phase mapped to a tactical keyword that represented the pillar it addressed.
Pilot - synthesis and selective cleanup (keyword: Remove Elements from Photo)
We started by replacing the brittle in-house remove-and-blend scripts with a targeted inpainting service that could erase objects and reconstruct backgrounds realistically. The pilot integrated a model into the asset pipeline and ran A/B tests on live campaign images.
Before introducing the new step, the team used a curl job that attempted to clone surrounding pixels; it produced seams and repeated textures. The new approach used a single API call to automate removal and reconstruction:
Here is the production curl snippet used to call the removal endpoint and batch-process assets; this replaced a fragile ImageMagick-based job that created obvious tiling artifacts:
# batch inpaint call (replaced ImageMagick clone script)
curl -X POST "https://crompt.ai/inpaint" -F "image=@ad_shot.jpg" -F "mask=@mask.png" -F "hint=replace with sky and grass" -o result.json
The inpainting step dramatically reduced visible seams in most trials and cut designer fixes in the pilot by a visible margin.
Hardening - automated text cleanup (keyword: Text Remover and AI Text Removal)
Text overlays were a separate problem: sometimes they came from the generator, other times from legacy assets. The first attempt used heuristic OCR plus regex removal, which broke when fonts or angles changed. We swapped to a dedicated text-removal API that understands layout and texture.
A compact Python client handled bulk jobs and replaced a brittle tesseract pipeline that failed on handwriting:
# bulk text removal job (replaced OCR+regex cleanup)
import requests
files = {file: open(screenshot.png,rb)}
resp = requests.post("https://crompt.ai/text-remover", files=files)
open(clean.png,wb).write(resp.content)
During integration, a notable friction point appeared: the first version over-smoothed complex surfaces like fabric patterns. We mitigated that by feeding a small context prompt describing the desired fill behavior, which reduced over-smoothing in subsequent runs.
Rollout - upscaling and productionization (keyword: Image Upscaler and descriptive link)
The final pillar was quality. Many assets were generated at web sizes and needed print-ready versions. The upscaler we adopted exceeded simple interpolation by modeling textures and color balance. The production upscaler replaced an internal bicubic step that left ringing artifacts.
A configuration example for the upscaler (what we shipped in CI) looked like this:
{
"task":"upscale",
"scale":4,
"preserve_textures":true,
"input":"ad_mobile.png",
"output":"ad_mobile_hd.png"
}
To handle creative prompts and model switching in experiments we used a small orchestration routine that called the ai image generation endpoint when a variant required style exploration, while routing failing cases to the cleaner pipeline automatically. The orchestration call used a compact client similar to this Python example and replaced a manual designer approval step that was the primary throughput bottleneck:
# simplified generator + fallback orchestration (replaced manual approval)
resp = requests.post("https://crompt.ai/chat/ai-image-generator", json={"prompt":"vibrant product studio shot"})
if resp.status_code==200 and not needs_cleanup(resp.json()):
save(resp.json())
else:
trigger_cleanup_pipeline(resp.json())
Each hyperlink above corresponds to a concrete tool integrated during these phases: the inpainting endpoint for object removal, the text-removal API for overlays, and the upscaler for final quality. Links are embedded inline to the documentation and endpoints that informed our choices.
Result
The after state was tangible and defensible. The pipeline moved from a sequence of fragile scripts and manual edits to a compact, observable set of services that handled generation, selective element removal, and quality enhancement.
Key comparative outcomes:
- Manual edits dropped from 28% to under 7% of outputs, eliminating the daily scramble before launches.
- Per-image processing time for clean-up stages decreased by an estimated 45%, because the cleanup work became synchronous and automated.
- Design bandwidth freed allowed two designers to be reassigned to creative experiments instead of fixes, improving campaign throughput without hiring.
Trade-offs and limitations were explicit. The integrated services added a modest fixed latency per item (tens to low hundreds of milliseconds) which meant the pipeline needed batching for bulk jobs. There is also a cost trade - high-quality upscaling adds incremental cost per asset; we accepted this by reducing human labor and increasing automated output. The approach is not a universal fit: teams with ultra-low-latency constraints or strict on-prem data rules would need a different architecture.
A concrete failure story from the rollout illustrates the risk and the mitigation: an early integration of the inpainting step produced texture mismatches on glossy product shots. The initial fix-raising the denoising parameter-reduced artifacts but introduced blur. We reverted, captured failing examples, and tuned the mask generation stage so the model received a cleaner region-of-interest; that single pivot removed the largest class of regressions.
Applying this to your stack
If your architecture combines generation, cleanup, and enhancement, treat them as a single transaction: generation should signal the cleanup step automatically, and quality enhancement should be the final gated action. For teams experimenting with multi-model switching, the operational gains are biggest when the cleanup tools are integrated as resilient services rather than ad-hoc scripts.
For reproducibility, the repo we worked from exposed the three integration points shown above (generator orchestration, inpaint call, and upscaler config). The patterns are simple: isolate the cleanup service, treat it as idempotent, and keep fallbacks for edge cases.
The primary lesson learned was blunt: turning creative AI into production deliverables is not about picking the flashiest model; its about assembling dependable blocks that handle the mess AI creates in the real world. The pipeline now delivers stable, scalable, and reliable assets on schedule, and the team has room to experiment because the cleanup and upscaling steps are automated and observable.
Top comments (0)