Phase 2: Image Generation · 55 min · Python · Hugging Face Diffusers · Real-ESRGAN
Inpainting, Outpainting, Upscaling & Restoration
Generation is step one — post-processing (inpainting, upscaling, face restoration) is what makes images production-ready.
Real-world application: Post-processing pipeline knowledge (inpainting, upscaling, face restoration) demonstrates you understand the full image generation pipeline, not just the generation step.
What you will learn
- Implement inpainting: selective regeneration of specific image regions
- Implement outpainting: extending image boundaries beyond original dimensions
- Apply upscaling with ESRGAN and Real-ESRGAN for higher resolution
- Use face restoration (CodeFormer, GFPGAN) to fix faces in generated images
Objective
Produce and compare image candidates against an explicit creative brief. In the paired studio lab, build a post-processing pipeline that takes a generated image and applies: (1) face restoration with CodeFormer, (2) 4x upscaling with Real-ESRGAN, (3) inpainting to fix a specific region. Demonstrate each step's effect and measure processing time.
The Problem
A team generates images with FLUX.1 Schnell at 1024x1024. The images look good, but:
- A product image has a distorted hand — needs inpainting to fix
- A hero image needs to be 4K for print — needs upscaling
- A portrait has blurry faces — needs face restoration
- A landscape needs to be wider — needs outpainting
Generation is only step one. Post-processing is what makes images production-ready. A pipeline without post-processing produces raw outputs that aren't suitable for production use.
What you'll build
A post-processing pipeline that takes a generated image and applies: (1) face restoration with CodeFormer, (2) 4x upscaling with Real-ESRGAN, (3) inpainting to fix a specific region. Measure processing time for each step.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers The Concept, Build, Check Yourself, Key Terms & Next — plus a hands-on lab, quiz, and project artifact.
Create a free account — the opening phases of 29 of 35 courses are free, no credit card.
Browse all courses · View pricing · DeVenture Academy