FaithDiff  by JyChen9811

Faithful image super-resolution and restoration using diffusion priors

Created 1 year ago
255 stars

Top 98.7% on SourcePulse

GitHubView on GitHub
Project Summary

FaithDiff addresses faithful image super-resolution and restoration for applications like classic film rejuvenation, old photo revival, and social media enhancement. Targeting low-level vision researchers, it leverages diffusion priors for high-quality results on degraded imagery.

How It Works

This CVPR 2025 project implements FaithDiff for faithful image super-resolution, integrated within Hugging Face's diffusers. It uses diffusion model priors to reconstruct high-fidelity images. The approach supports FP8 inference and CPU offloading to drastically reduce memory, enabling high-resolution tasks on consumer hardware.

Quick Start & Requirements

  • Gradio demo: python gradio_demo.py.
  • Dependencies: Python, Conda, CUDA GPUs.
  • Memory optimization: --cpu_offload and --use_fp8 crucial for low-VRAM GPUs (5GB VRAM for 2x upscale with both).
  • Training: conda env create -f environment.yml, then run stage scripts.
  • Inference: Download pre-trained models (FaithDiff, SDXL, LLaVA, etc.) to ./checkpoints, execute test.py.
  • 8K+ restoration: Use --use_tile_vae flag.

Highlighted Details

  • CVPR 2025 publication on faithful image super-resolution.
  • Code integrated into Hugging Face diffusers.
  • Significant memory reduction via FP8 inference and CPU offloading, enabling 8K+ restoration on 24GB GPUs.
  • Introduces RealDeg dataset (238 real-world degraded images).

Maintenance & Community

  • Developed by Junyang Chen, Jinshan Pan, Jiangxin Dong (IMAG Lab, Nanjing University of Science and Technology).
  • Acknowledges diffusers, SUPIR, TLC, SimpleTuner.
  • Contact: jychen9811@gmail.com.
  • No explicit community channels or roadmap links provided.

Licensing & Compatibility

  • The repository's license is not explicitly stated in the README. Clarification is needed for commercial use or integration into proprietary systems.

Limitations & Caveats

  • Ultra-high-resolution results may still require substantial GPU resources (e.g., 24GB VRAM).
  • Ongoing development for variants like "FaithDiff-SD3-Large" suggests potential incompleteness or experimental status.
Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
8 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.