Feature · Generation

Image Upscaling

Scale any image to 4× its original resolution using Real-ESRGAN models running entirely on your GPU. Batch queues, watch-folder automation, and automatic format detection — no cloud upload, no per-image fees.

4× Super-Resolution

Real-ESRGAN and ESRGAN models run locally via PyTorch and the Diffusers/Transformers stack already powering image generation. Input a 512×512 output from the image generator and receive a 2048×2048 upscaled result with genuine detail synthesis, not just bilinear interpolation. The same GPU that generates images handles upscaling without switching tools.

Batch Queue

Submit a folder of images as a single upscaling job. Celery workers process each image in turn, emitting progress events over Socket.IO so the dashboard shows a live count of completed/remaining images. Output files land in data/outputs/ alongside the originals, named with a consistent _4x suffix so they're easy to identify and retrieve.

Watch Folder

Point the upscaler at a watch directory. Any image dropped into that folder triggers an automatic upscaling job. This integrates naturally with the image generation pipeline: configure image generation to output into the watch folder and every generated image is automatically queued for upscaling without manual intervention.

Format Detection

The upscaling pipeline detects input format automatically and preserves it in the output: PNG stays PNG (with alpha channel intact), JPEG output honours the original quality setting, WebP is handled natively. The enhanced file processor identifies format from file content, not extension, so mis-labelled files are handled correctly.

What it does

From generation output to print-ready in one step

Diffusion models generate images at a fixed resolution — typically 512×512 or 768×768 — constrained by VRAM and inference speed. Those resolutions are sufficient for web use but fall short for print, large-format display, or any context where a viewer gets close to the image. Image Upscaling bridges that gap by running Real-ESRGAN, a generative super-resolution model trained to synthesise plausible high-frequency detail rather than merely interpolating pixels. The result at 4× genuinely looks better: textures have definition, edges are sharp, faces retain structure.

The upscaling pipeline is built on the same PyTorch and Transformers stack that handles image generation, so no additional dependencies are required. CUDA acceleration is automatic when a compatible GPU is available, managed by gpu_resource_coordinator.py. The coordinator queues upscaling jobs when VRAM is committed to image or video generation, preventing out-of-memory errors. When the GPU is free, queued upscaling jobs proceed automatically. CPU fallback is available for systems without a CUDA GPU, though at significantly reduced throughput.

Every upscaled output is registered in the Content Library with metadata linking it to the source image, so you can always trace a 4× result back to its original generation job and parameters. From the Content Library you can download individual files, download a batch as a ZIP, or pass them directly to the Video Editor or Video Text Overlay for further processing. The watch-folder integration makes it possible to build a fully automated pipeline: describe a prompt in the image generator, watch the outputs drop into the upscaler's input folder, and collect 4× results in the output folder — all without touching the UI between jobs.

Under the hood

Model execution. The upscaling service uses PyTorch 2.2 with the Diffusers 0.31 and Transformers 4.48 libraries already present in the backend virtual environment. Real-ESRGAN model weights are downloaded on first use and cached in data/cache/ alongside other model artefacts. The GPU resource coordinator (backend/services/gpu_resource_coordinator.py) tracks VRAM allocation with a configured maximum split size of 512 MB to prevent fragmentation. Upscaling tasks run as Celery jobs dispatched by unified_task_executor.py, with progress tracked through unified_progress_system.py and emitted over Socket.IO to the browser UI and the llx jobs watch command.

File handling and output registration. Input images are read through backend/utils/enhanced_file_processor.py, which handles format detection, colour space normalisation, and alpha channel preservation. Output files are written to data/outputs/ via the output API and registered as Job output records in SQLite. The Content Library surface reads these records to populate the browsable gallery. Format conversion uses Pillow (already installed) for lossless round-trips through PNG and for JPEG quality preservation. The watch-folder daemon runs as a lightweight Celery Beat task that polls the configured input directory at a configurable interval and queues new files for upscaling.

# Upscale a single image via the API
curl -X POST http://localhost:5000/api/generation/upscale   -H "Content-Type: application/json"   -d '{"file_id": "img_abc123", "scale": 4, "model": "realesrgan-x4plus"}'

# Watch the job
llx jobs watch JOB_ID

# Batch upscale a folder
curl -X POST http://localhost:5000/api/generation/upscale/batch   -H "Content-Type: application/json"   -d '{"folder_path": "data/outputs/session_20260505", "scale": 4}'
Use cases

Where upscaling fits in your workflow

Print and large-format production

Generate concept images at 768×768 using the image generator — fast iteration, low VRAM cost — then upscale the approved outputs to 3072×3072 for print. The 4× upscale adds genuine texture detail that makes the difference between a pixel-soft print and a sharp one. The entire process runs offline: no uploading to a cloud upscaler, no per-image billing, no usage limits.

High-resolution social media assets

Generate a batch of product or concept images at standard resolution, then run a batch upscale job overnight. The resulting high-resolution files go directly into the Content Library where you can tag, search, and re-use them. Connect the output folder to Video Text Overlay to produce captioned social media cards from the upscaled originals without any additional tool-switching.

Archival restoration of old images

Feed a folder of low-resolution scanned photographs or legacy web graphics into the watch folder. Real-ESRGAN's training on natural image degradations — compression artefacts, noise, blur — makes it effective at restoring old images, not just upscaling synthetic ones. Outputs land in data/outputs/ registered as job results, ready for review in the Content Library.

Guaardvark Upscaling vs. cloud upscalers

Cloud image upscaling services charge per image, cap resolution, and upload your content to third-party servers. Guaardvark runs Real-ESRGAN on your own GPU: cost per image is zero beyond electricity, there are no resolution caps, and your images never leave your machine. For commercial work where images may contain proprietary product visuals, unreleased designs, or client assets, local processing is not a preference but a requirement. The batch queue and watch-folder automation also mean you can process thousands of images overnight without babysitting a web UI or managing API rate limits.

See full comparison →

FAQ

Image Upscaling — common questions

Which upscaling models are available?

The primary model is realesrgan-x4plus, optimised for natural images with complex textures. realesrgan-x4plus-anime is also available, tuned for illustrations and anime-style art with cleaner lines and flatter colour regions. Model weights are downloaded on first use and cached in data/cache/. Additional ESRGAN-compatible models can be added by placing weights in the cache directory and registering them in the model settings.

How much VRAM does upscaling require?

Real-ESRGAN at 4× on a 512×512 input requires approximately 2–4 GB of VRAM depending on tile size settings. Larger inputs are processed in tiles to keep VRAM usage constant regardless of input dimensions. The gpu_resource_coordinator.py service queues upscaling jobs when VRAM is committed to generation tasks, so upscaling and image generation never compete for GPU memory.

Can I run upscaling on CPU if I don't have a GPU?

Yes. PyTorch falls back to CPU when CUDA is not available. CPU upscaling is functional but significantly slower — expect 30–120 seconds per image depending on input size and CPU speed, compared to 2–5 seconds on a modern GPU. Batch jobs run identically on CPU; they just take longer. The progress system reports completion accurately either way.

What is the maximum input resolution supported?

There is no hard input resolution cap. Very large inputs are processed in overlapping tiles, with tile size configurable in Settings. The default tile size of 512×512 handles arbitrarily large inputs without running out of VRAM, at the cost of slightly increased processing time for the overlap stitching step.

Are upscaled outputs linked to the original generation job?

Yes. Every upscaled file is registered in the database with a reference to the source file's ID and, if the source was a generated image, to the generation job that produced it. In the Content Library you can view the full provenance chain: prompt → generation job → original output → upscaled output. You can also navigate back to the generation parameters and re-run the job with modified settings.

4× resolution, zero cloud cost

Install Guaardvark and run Real-ESRGAN upscaling entirely on your own GPU — batch queues, watch folders, and Content Library integration included.