Views
No views yet
stable-diffusion-x4-upscaler -> stable-diffusion-v1-5 + ControlNet Tile,
img2img, tiled) on a 60-image frozen test set at 5x:| Pipeline | Mean LPIPS at 5x (lower = better) |
|---|---|
| Real-ESRGAN baseline | 0.299 |
| Two-stage (no LoRA) | 0.433 |
| Two-stage + this LoRA | 0.443 |
| Test slice | LoRA win rate vs no-LoRA two-stage | Δ mean LPIPS |
|---|---|---|
| traditional / landscape | 30% | +0.0145 (worse) |
| traditional / cityscape | 20% | +0.0156 (worse) |
| traditional / animals | 30% | +0.0040 |
| hard / fine_architecture | 25% | +0.0150 (worse) |
| hard / hf_texture | 50% | +0.0093 (worse) |
| hard / night | 62.5% | -0.0056 (better) |
| hard / reflection | 60% | +0.0019 |
| hard / noise | 50% | +0.0109 (worse) |
| hard / text | 46% | +0.0092 (worse) |
stable-diffusion-x4-upscaler's cross-attention modules and produced
catastrophically destructive deltas (output LPIPS 0.78-0.92, vs base 0.33)
regardless of recipe. Detailed failure analysis is in the project's Phase 4c
writeup; the short version is that x4-upscaler's denoising trajectory is
unusually fragile to U-Net perturbations and the SUPIR paper's
architectural choices (zero-init additive adapters on intermediate
ResBlocks, NOT LoRA on attention) are validated by our negative result.stable-diffusion-v1-5/stable-diffusion-v1-5to_q / to_k / to_v / to_out.0 in the UNet cross-attentionbradhinkel/sd-image-upscaler-pairs, private dataset)1from diffusers import StableDiffusionControlNetImg2ImgPipeline, ControlNetModel
2from peft import PeftModel
3import torch
4
5controlnet = ControlNetModel.from_pretrained(
6 "lllyasviel/control_v11f1e_sd15_tile", torch_dtype=torch.float16
7)
8pipe = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
9 "stable-diffusion-v1-5/stable-diffusion-v1-5",
10 controlnet=controlnet,
11 torch_dtype=torch.float16,
12 safety_checker=None,
13).to("cuda")
14pipe.unet = PeftModel.from_pretrained(pipe.unet, "bradhinkel/sd-image-upscaler-sd15-lora")
15
16# Use as the stage-B refinement step in a two-stage upscale pipeline.
17# See github.com/bradhinkel/SD_image_upscaler for the full inference path.Salesforce/blip-image-captioning-large