Ai image upscaling

From FerroxLabs/murage · View interactive version

Ai image upscaling is an AI agent skill from the GitHub repository FerroxLabs/murage. Produces AI image upscaling and detail enhancement specifications for Midjourney upscale variants, DALL-E edit mode, and Stable Diffusion img2img with model-specific parameters. Use when the user asks to upscale an AI-generated image, enhance detail, increase resolution, or improve quality of an exi

How to use this skill

Skill file

AI Image Upscaling

When to Use

Use this skill when:

Do NOT use when:


Process

Step 1: Assess the Source Image and Establish Requirements

Before selecting any method, gather the four critical variables that determine every downstream decision.


Step 2: Calculate Target Pixel Dimensions

Never let the user proceed without a confirmed pixel target. Vague targets like "higher resolution" cause wasted iterations.

| Print Size | 300 DPI | 150 DPI | 100 DPI |

|---|---|---|---|

| 4x6 in | 1200 x 1800 | 600 x 900 | 400 x 600 |

| 5x7 in | 1500 x 2100 | 750 x 1050 | 500 x 700 |

| 8x10 in | 2400 x 3000 | 1200 x 1500 | 800 x 1000 |

| 11x14 in | 3300 x 4200 | 1650 x 2100 | 1100 x 1400 |

| 16x20 in | 4800 x 6000 | 2400 x 3000 | 1600 x 2000 |

| 18x24 in | 5400 x 7200 | 2700 x 3600 | 1800 x 2400 |

| 24x36 in | 7200 x 10800 | 3600 x 5400 | 2400 x 3600 |

| A4 (8.27x11.69 in) | 2480 x 3508 | 1240 x 1754 | 827 x 1169 |

| A3 (11.69x16.54 in) | 3508 x 4961 | 1754 x 2480 | 1169 x 1654 |


Step 3: Select the Upscaling Method by Source Model

The source model determines which native tools are available. Always use the native tool first, then chain external upscalers.

Midjourney Upscaling (v5.2, v6, v6.1, v7)
DALL-E / GPT-image-1 Upscaling
Stable Diffusion Upscaling

SD has the richest upscaling toolkit. Choose the method based on available VRAM, desired control, and style of image.

Method 1: SD img2img with resolution scaling

Method 2: SD Upscale (Tiled) / Ultimate SD Upscale (Automatic1111 script)

Method 3: Built-in AI upscalers (Extras tab in Automatic1111)

| Upscaler | Scale | Best For | Notes |

|---|---|---|---|

| Real-ESRGAN 4x+ | 2x-4x | Photorealistic general | Fastest, highest quality for photos |

| Real-ESRGAN 4x+ Anime6B | 2x-4x | Anime, flat illustration, vector-like | Reduces halftone, preserves clean lines |

| ESRGAN 4x | 2x-4x | Older photorealistic images | Legacy, generally worse than Real-ESRGAN |

| SwinIR 4x | 2x-4x | General, sharper edges than ESRGAN | Slightly slower, good for text and graphics |

| BSRGAN 4x | 2x-4x | Compressed or noisy sources | Strong denoising, smooths some fine detail |

| LDSR | 2x-4x | Maximum quality, slow | 100-200x slower, marginally better for faces |

| R-ESRGAN General WDN 4x | 2x-4x | Compressed web images | Handles JPEG block artifacts well |

| 4x-UltraSharp | 2x-4x | Photorealistic ultra detail | Community model, excellent for faces/detail |

| 4x-Remacri | 2x-4x | Mixed media, moderate detail | Good all-rounder community model |

Method 4: HiRes Fix (Automatic1111 / ComfyUI)

Method 5: ControlNet Tile for Upscaling


Step 4: Build the Upscaling Pipeline

Translate the method selection into a concrete sequence of operations with specific settings at each step.


Step 5: Specify All Settings Precisely

Document every parameter so the user can reproduce the result exactly.


Step 6: Define the Quality Verification Process

Automated upscaling frequently introduces artifacts. Specify exactly what to check.


Step 7: Deliver the Specification and Manage Expectations

Communicate limitations clearly alongside the technical plan.


Output Format

## AI Image Upscaling Specification

### Source Analysis
- **Source model and version:** [e.g., Midjourney v6.1, SD XL 1.0, DALL-E 3]
- **Current dimensions:** [width x height px]
- **Current estimated DPI at intended output size:** [calculated value]
- **Image style category:** [photorealistic / illustrative / anime / graphic / abstract]
- **Quality defects in source:** [e.g., soft edges, JPEG artifacts, low base detail, none]
- **Original prompt (if available):** [or "unknown"]

### Target Requirements
- **Intended use:** [screen / commercial print / large format / editorial]
- **Physical output size (if print):** [W x H inches/mm]
- **Required DPI:** [300 / 200 / 150 / 96 / other]
- **Target pixel dimensions:** [width x height px]
- **Required scale factor:** [e.g., 2.0x, 4.0x, 5.8x]
- **Aspect ratio note:** [matched / source crop required -- specify which dimension to crop]

### Recommended Pipeline

| Step | Method | Tool | Key Settings | Input Resolution | Output Resolution |
|------|--------|------|-------------|-----------------|-------------------|
| 1 | [e.g., Native MJ Upscale] | [Midjourney] | [Subtle] | [1024x1024] | [2048x2048] |
| 2 | [e.g., AI Upscaler] | [Real-ESRGAN] | [4x+, PNG] | [2048x2048] | [8192x8192] |
| 3 | [e.g., Detail Enhancement] | [SD img2img] | [denoise 0.30, ControlNet Tile 0.65] | [8192x8192] | [8192x8192] |
| 4 | [e.g., Final resize] | [Image editor] | [Bicubic, target DPI] | [8192x8192] | [target px] |

### Step-by-Step Settings

**Step 1: [Method Name]**
[Detailed settings for this step]
- Setting A: [value]
- Setting B: [value]
- Expected output: [description]

**Step 2: [Method Name]**
[Detailed settings for this step]
- Setting A: [value]
- Setting B: [value]
- Expected output: [description]

[Continue for each step]

### Stable Diffusion Parameters (if applicable)
- **Checkpoint:** [model name]
- **VAE:** [vae name or "baked in"]
- **Sampler:** [e.g., DPM++ 2M Karras]
- **Steps:** [number]
- **CFG Scale:** [value]
- **Denoising Strength:** [value]
- **Prompt:** [text]
- **Negative Prompt:** [text]
- **Seed:** [value or -1]
- **ControlNet:** [model, weight, preprocessor if applicable]

### Midjourney Parameters (if applicable)
- **Grid cell selected:** U[1/2/3/4]
- **Upscale type:** Subtle / Creative
- **Current job resolution:** [value]
- **Post-export tool:** [external upscaler if required]

### Output File Specifications
- **Intermediate file format:** PNG (lossless, all steps except final)
- **Final delivery format:** [TIFF at 300 DPI / PNG / JPEG 90+ / PDF]
- **Color profile:** [sRGB / Adobe RGB / CMYK -- specify only for print]
- **Final pixel dimensions:** [width x height]
- **Final file size estimate:** [approximate MB]

### Quality Verification Checklist
- [ ] No halo or ringing artifacts at high-contrast edges
- [ ] No tiling seam artifacts at regular intervals
- [ ] Textures natural (not plastic/waxy smoothing from ESRGAN over-smoothing)
- [ ] Text and fine typography remain legible (if applicable)
- [ ] Face and hand anatomy correct (no hallucinated digits or distorted features)
- [ ] Color/saturation matches original (no VAE or profile shift)
- [ ] Repeating patterns (fabric, tile, foliage) remain coherent
- [ ] Viewed at 100% zoom and at intended display/print scale
- [ ] Aspect ratio and crop reviewed for composition

### Limitations and Expectations
- **Fidelity level:** [High (2x) / Moderate (4x) / Speculative (6x+)]
- **Known risks for this image:** [specific to this image's style and content]
- **Alternative if quality is insufficient:** [e.g., regenerate at source model max resolution]
- **Proof recommendation:** [physical proof before print run / screen proof at 100% zoom]

Rules

  1. Never upscale from a JPEG source without deblocking first. JPEG block artifacts at 8x8 pixel boundaries will be amplified by every upscaling method. Apply BSRGAN or the Real-ESRGAN WDN model for deblocking as the first step when the source is JPEG, especially under quality 90.
  1. Denoising strength above 0.50 is not upscaling -- it is regeneration. Beyond 0.50, SD img2img introduces compositional changes, not just detail enhancement. Never recommend values above 0.50 for upscaling without explicitly flagging that the result will deviate from the original.
  1. Always specify lossless PNG or TIFF for intermediate steps. Applying JPEG compression between pipeline steps compounds quality loss. Every re-save as JPEG re-introduces blocking artifacts. JPEG is only acceptable at the final delivery step.
  1. Tile overlap must be 64 pixels minimum; 128 is strongly preferred. Tiled upscaling with less than 64 px overlap produces a visible grid pattern across the image. This is the most common beginner mistake with Ultimate SD Upscale and cannot be fixed post-hoc.
  1. Match the upscaler model to the image style -- this is not optional. Real-ESRGAN x4plus on an anime illustration introduces a photorealistic texture overlay that destroys the art style. Real-ESRGAN Anime6B on a photorealistic portrait produces an uncanny illustration effect. Mismatched upscaler models produce worse results than simple bicubic interpolation.
  1. Use the same checkpoint and VAE in every SD pass. A VAE mismatch between the original generation and the upscaling pass introduces color saturation shifts, particularly in shadows and highlights. If the original VAE is unknown, use the VAE associated with the checkpoint being used for the upscale pass consistently.
  1. The 8x total scale factor is the practical quality ceiling. From 512 px to 4096 px (8x) is achievable with good multi-step pipelines. From 512 px to 8192 px (16x) is largely synthetic hallucination. Always calculate the total scale factor from the original unupscaled source, not from the current intermediate resolution.
  1. Print delivery files must have an embedded color profile. Delivering a TIFF or PNG without an embedded sRGB or Adobe RGB profile to a commercial printer will result in unpredictable color reproduction. Always embed the profile at the final export step.
  1. Calculate required pixel dimensions before starting any upscaling pipeline. Upscaling to "as high as possible" without a target is wasteful and often produces files far larger than the printer's system can handle. 300 DPI at an 8x10 print is 2400x3000 px -- a 24 MB PNG, well within all workflows. At the same DPI for a 36x48 poster, the file is 432 MB and may exceed standard print submission limits.
  1. Midjourney Creative upscale can introduce anatomical errors at high-detail enhancement. Faces, hands, and text are the highest-risk areas. If the original image contains these elements and they are correct, always try Subtle first. Creative is appropriate only when the original detail in those areas is already damaged or unacceptably soft.

Edge Cases

Very Small or Heavily Degraded Source (under 256x256, or JPEG quality under 70)

A 256x256 source contains only 65,536 pixels of information. A 4x upscale to 1024x1024 produces 1,048,576 pixels -- 94% of which must be synthesized. The result cannot be reliable regardless of the upscaler used. Handling:

Image Contains Critical Typography or Logos

Text is processed character-by-character by diffusion models -- the model has no understanding that a pixel cluster represents a letter. Upscaling at any denoising above 0.20 in SD img2img risks introducing character mutations (serifs that change, letter spacing that shifts, numerals that invert). Handling:

Tiled Upscaling Producing Inconsistent Lighting Across Tiles

When Ultimate SD Upscale processes at denoising 0.35+, each tile undergoes an independent diffusion pass. Areas near a window might receive different lighting interpretation in adjacent tiles, producing a patchwork appearance. Handling:

Aspect Ratio Mismatch Between Source and Target

A 1:1 square AI image being prepared for a 16:9 landscape print (or 2:3 portrait print) requires a crop decision that significantly affects composition. Handling:

Batch Upscaling 20+ Images for Consistent Series

Batch processing introduces the risk of inconsistent settings producing visible variation across a series. Handling:

Extreme Resolution Target (24x36 inches at 300 DPI = 7200x10800 px)

This target represents 77.8 megapixels. A typical SD VRAM-constrained environment cannot generate or img2img at this resolution in a single pass. The pipeline must be tiled. Handling:

ControlNet Tile Producing Style Drift at High Denoising

When ControlNet Tile is used at denoising 0.5+ to aggressively enhance detail, the diffusion model's prior can override the tile conditioning and introduce style drift -- particularly visible as the image taking on the stylistic characteristics of the checkpoint's dominant training data (often anime faces on photorealistic portraits, or photorealistic texture on illustration-style images). Handling:


Example

User Input: "I have a Midjourney v6.1 image of a detailed fantasy forest scene -- 1024x1024 -- and I need to print it at 18x24 inches for a gallery show. The art director wants 300 DPI. The style is painterly and illustrative, no faces or text. How do I upscale it?"


AI Image Upscaling Specification

Source Analysis

Target Requirements

Action required before upscaling: The source is 1:1 (square) and the print target is 3:4 portrait (18x24). Upscaling the square image to 5400x5400 yields an 18x18 inch print at 300 DPI -- 6 inches short of the 24-inch height. Confirm one of the following with the user:

1. Crop the final print to 18x18 (center crop, square format) -- no outpainting needed

2. Extend the canvas vertically using Midjourney's pan/outpaint tool before upscaling, adding approximately 341 px of forest scene at top or bottom (or split 170 above, 171 below) to reach 1024x1365 (3:4 ratio)

3. Accept moderate upscaling distortion by stretching the square to 3:4 -- this is not recommended as it will visually distort the proportions of trees and foliage

Proceeding with Option 2 (outpaint first) as recommended. If user cannot outpaint, Option 1 (square crop) is the fallback.

Recommended Pipeline

| Step | Method | Tool | Key Settings | Input Resolution | Output Resolution |

|------|--------|------|-------------|-----------------|-------------------|

| 1 | Midjourney Native Upscale | Midjourney | Upscale (Subtle) | 1024 x 1024 | 2048 x 2048 |

| 2 | Pre-upscale outpaint (if 3:4 target) | Midjourney Pan | Extend bottom by ~680 px to reach 2048 x 2730 | 2048 x 2048 | 2048 x 2730 |

| 3 | AI Upscaler Pass 1 | Real-ESRGAN | Anime6B x4, PNG output | 2048 x 2730 | 8192 x 10920 |

| 4 | Downscale to target | Image Editor | Lanczos / Bicubic Sharper | 8192 x 10920 | 5400 x 7200 |

| 5 | Output sharpening | Image Editor | Unsharp Mask: 0.7 px radius, 65% amount, threshold 3 | 5400 x 7200 | 5400 x 7200 |

Total scale factor from original 1024x1024 to final 5400x5400 area: 5.27x -- well within the reliable 2x-6x quality range for a multi-step pipeline.


Step-by-Step Settings

Step 1: Midjourney Upscale (Subtle)

Step 2: Outpaint to 3:4 aspect ratio (skip if accepting square crop)

Step 3: Real-ESRGAN AI Upscale x4

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.