Gpen-bfr-2048.pth -
Understanding GPEN-BFR-2048.pth: The Powerhouse Behind High-Resolution Face Restoration
Download:
It is usually hosted on the official GPEN GitHub or Hugging Face model repositories . gpen-bfr-2048.pth
- The model is implemented in PyTorch.
- The model has a complex architecture, potentially involving multiple layers and modules.
- The model uses a large number of parameters ( possibly around 2048 dimensions or embedding size).
-
import torch import numpy as np
File type
| Attribute | Value | |-----------|-------| | | PyTorch checkpoint ( torch.save ) | | Size on disk | ≈ 2.1 GB (fp32) – ~1.1 GB when saved with torch.save(..., _use_new_zipfile_serialization=False, pickle_protocol=4) and torch.save(..., dtype=torch.float16) | | Top‑level keys | 'encoder', 'mapper', 'generator', 'args' | | encoder | state_dict of a ResNet‑50 (BN layers stripped) | | mapper | 2‑layer MLP (512 → 512) plus LayerNorm | | generator | StyleGAN2 weights (including the new 2048‑pixel synthesis blocks) | | args | Namespace containing training hyper‑parameters, input resolution, output resolution, and a version string ( GPEN-BFR-v2.0-2048 ). | | Compatibility | Requires PyTorch ≥ 1.8 and CUDA ≥ 11.0 (or CPU‑only fallback). The checkpoint can be loaded on any device with the same architecture (ResNet‑50 + StyleGAN2). | Understanding GPEN-BFR-2048