SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.07228 · 2023

RestoreFormer++: Towards Real-World Blind Face Restoration from Undegraded Key-Value Pairs

arXiv · PDF · Open in the Atlas

Code that ran

11 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2308.07228.json · badge: /api/ran/2308.07228.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
wzhouxiff/restoreformerplusplus canonical (classifier label)
classifier basis: census
11 ran · 1 no recorded run
FunctionStatusWhere it lives
Normalize Ran
ran; our contract draft was wrong, not the code
wzhouxiff/restoreformerplusplus/gradio_demo/RestoreFormer_arch.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Xingyu-Zheng/BiDM, is pointer only (licence: NONE) · get_code("c3a6b977022957cb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from Xingyu-Zheng/BiDM, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

all_gather Ran
ran; our contract draft was wrong, not the code
wzhouxiff/restoreformerplusplus/RestoreFormer/distributed/distributed.py
code served (permissive licence) · get_code("5d1755bb165b0225")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import pickle

torch.manual_seed(0)

# The function all_gather takes a single parameter 'data'
# Looking at the function body, it:
# 1. Pickles the data
# 2. Converts it to a ByteTensor
# 3. Gathers it across processes
# 4. Unpickles it back

# Since we're in a non-distributed setting (world_size == 1),
# the function will just pickle and unpickle the data.
# We can pass any picklable Python object.

# Create some sample data - a dictionary with various types
sample_data = {
    'tensor': torch.randn(2, 4),
    'list': [1, 2, 3, 4],
    'string': 'test_data',
    'number': 42,
    'nested': {'a': 1, 'b': 2}
}

ARGS = {
    'data': sample_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
all_reduce Ran
ran, honoured the contract we drafted
wzhouxiff/restoreformerplusplus/RestoreFormer/distributed/distributed.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from petergriffinjin/lmindexer, is pointer only (licence: NONE) · get_code("ecc901a1548f3862")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from petergriffinjin/lmindexer, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

count_params Ran
ran, honoured the contract we drafted
wzhouxiff/restoreformerplusplus/RestoreFormer/modules/util.py
code served (permissive licence) · get_code("5ef87f1a172f152b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_ckpt_path Ran
ran; our contract draft was wrong, not the code
wzhouxiff/restoreformerplusplus/RestoreFormer/util.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lxa9867/ControlVAR, is pointer only (licence: NONE) · get_code("e70eb36cf08faee4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lxa9867/ControlVAR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

md5_hash Ran
ran; our contract draft was wrong, not the code
wzhouxiff/restoreformerplusplus/RestoreFormer/util.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from zh460045050/V2L-Tokenizer, is pointer only (licence: NONE) · get_code("07d90bd6ae1be7db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from zh460045050/V2L-Tokenizer, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

nonlinearity Ran
ran; our contract draft was wrong, not the code
wzhouxiff/restoreformerplusplus/gradio_demo/RestoreFormer_arch.py
code served (permissive licence) · get_code("3137073275f8c21a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes a single parameter 'x' which is used with:
# - multiplication operator (*)
# - torch.sigmoid() function
# This means x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize_tensor Ran
ran; our contract draft was wrong, not the code
wzhouxiff/restoreformerplusplus/RestoreFormer/modules/losses/lpips.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from zh460045050/V2L-Tokenizer, is pointer only (licence: NONE) · get_code("7257fdf155f5ef45")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from zh460045050/V2L-Tokenizer, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

reduce_dict Ran
ran; our contract draft was wrong, not the code
wzhouxiff/restoreformerplusplus/RestoreFormer/distributed/distributed.py
code served (permissive licence) · get_code("7dbdda0920e3d074")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a simple input dictionary with tensor values
input_dict = {
    'loss': torch.tensor(1.5),
    'accuracy': torch.tensor(0.95),
    'metric_a': torch.tensor([0.1, 0.2, 0.3, 0.4]),
}

ARGS = {
    'input_dict': input_dict,
    'average': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
retrieve Ran
ran, honoured the contract we drafted
wzhouxiff/restoreformerplusplus/RestoreFormer/util.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lxa9867/ControlVAR, is pointer only (licence: NONE) · get_code("31543f3e2c18272e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lxa9867/ControlVAR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

spatial_average Ran
ran; our contract draft was wrong, not the code
wzhouxiff/restoreformerplusplus/RestoreFormer/modules/losses/lpips.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from zh460045050/V2L-Tokenizer, is pointer only (licence: NONE) · get_code("e268053216b1dd62")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from zh460045050/V2L-Tokenizer, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_file_from_url Not yet run
unverified (harvested, no recorded run)
wzhouxiff/restoreformerplusplus/RestoreFormer/download_util.py
code served (permissive licence) · get_code("0defd439e37477e9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 12 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 3 the same month, 12 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
nonlinearity 156 other papers
44 dated earlier, 1 the same month, 110 later, 1 same year, order not determinable · 25 only as an assembly brick
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.00132 (2021-06)
On Fast Sampling of Diffusion Probabilistic Models
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
and 153 more not named here
Normalize 90 other papers
35 dated earlier, 2 the same month, 53 later · 32 only as an assembly brick
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.00132 (2021-06)
On Fast Sampling of Diffusion Probabilistic Models
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
and 87 more not named here
md5_hash 30 other papers
8 dated earlier, 1 the same month, 20 later, 1 same year, order not determinable
2008.01777 (2020-08)
Making Sense of CNNs: Interpreting Deep Representations & Their Invariances with INNs
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
and 27 more not named here
normalize_tensor 13 other papers
5 dated earlier, 7 later, 1 same year, order not determinable
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2203.16521 (2022-03)
CoordGAN: Self-Supervised Dense Correspondences Emerge from GANs
and 10 more not named here
get_ckpt_path 10 other papers
1 dated earlier, 8 later, 1 same year, order not determinable
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
Li_MAGE_MAsked_Generative_Encoder_To_Unify_Representation_Learning_and_Image_CVPR_2023_paper (2023 (year only))
MAGE: MAsked Generative Encoder to Unify Representation Learning and Image Synthesis
aaai_29913 (2024 (year only))
Topic-VQ-VAE: Leveraging Latent Codebooks for Flexible Topic-Guided Document Generation
and 7 more not named here
spatial_average 9 other papers
5 dated earlier, 3 later, 1 same year, order not determinable
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2203.16521 (2022-03)
CoordGAN: Self-Supervised Dense Correspondences Emerge from GANs
and 6 more not named here
retrieve 5 other papers
1 dated earlier, 3 later, 1 same year, order not determinable
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
Li_MAGE_MAsked_Generative_Encoder_To_Unify_Representation_Learning_and_Image_CVPR_2023_paper (2023 (year only))
MAGE: MAsked Generative Encoder to Unify Representation Learning and Image Synthesis
aaai_29913 (2024 (year only))
Topic-VQ-VAE: Leveraging Latent Codebooks for Flexible Topic-Guided Document Generation
and 2 more not named here
count_params 4 other papers
1 dated earlier, 2 later, 1 same year, order not determinable
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
Li_MAGE_MAsked_Generative_Encoder_To_Unify_Representation_Learning_and_Image_CVPR_2023_paper (2023 (year only))
MAGE: MAsked Generative Encoder to Unify Representation Learning and Image Synthesis
aaai_29913 (2024 (year only))
Topic-VQ-VAE: Leveraging Latent Codebooks for Flexible Topic-Guided Document Generation
and 1 more not named here
all_gather 3 other papers
2 dated earlier, 1 later
Gu_Vector_Quantized_Diffusion_Model_for_Text-to-Image_Synthesis_CVPR_2022_paper (2022 (year only))
Vector Quantized Diffusion Model for Text-to-Image Synthesis
2205.16007 (2022-05)
Improved Vector Quantized Diffusion Models
2404.11949 (2024-04)
Sketch-guided Image Inpainting with Partial Discrete Diffusion Process
reduce_dict 3 other papers
2 dated earlier, 1 later
Gu_Vector_Quantized_Diffusion_Model_for_Text-to-Image_Synthesis_CVPR_2022_paper (2022 (year only))
Vector Quantized Diffusion Model for Text-to-Image Synthesis
2205.16007 (2022-05)
Improved Vector Quantized Diffusion Models
2404.11949 (2024-04)
Sketch-guided Image Inpainting with Partial Discrete Diffusion Process
all_reduce 1 other paper
1 later
2310.07815 (2023-10)
Language Models As Semantic Indexers
load_file_from_url 1 other paper
1 later
2309.03020 (2023-09)
SEAL: A Framework for Systematic Evaluation of Real-World Super-Resolution

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Blind face restoration aims at recovering high-quality face images from those with unknown degradations. Current algorithms mainly introduce priors to complement high-quality details and achieve impressive progress. However, most of these algorithms ignore abundant contextual information in the face and its interplay with the priors, leading to sub-optimal performance. Moreover, they pay less attention to the gap between the synthetic and real-world scenarios, limiting the robustness and generalization to real-world applications. In this work, we propose RestoreFormer++, which on the one hand introduces fully-spatial attention mechanisms to model the contextual information and the interplay with the priors, and on the other hand, explores an extending degrading model to help generate more realistic degraded face images to alleviate the synthetic-to-real-world gap. Compared with current algorithms, RestoreFormer++ has several crucial benefits. First, instead of using a multi-head self-attention mechanism like the traditional visual transformer, we introduce multi-head cross-attention over multi-scale features to fully explore spatial interactions between corrupted information and high-quality priors. In this way, it can facilitate RestoreFormer++ to restore face images with higher realness and fidelity. Second, in contrast to the recognition-oriented dictionary, we learn a reconstruction-oriented dictionary as priors, which contains more diverse high-quality facial details and better accords with the restoration target. Third, we introduce an extending degrading model that contains more realistic degraded scenarios for training data synthesizing, and thus helps to enhance the robustness and generalization of our RestoreFormer++ model. Extensive experiments show that RestoreFormer++ outperforms state-of-the-art algorithms on both synthetic and real-world datasets.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2308.07228")
get_code_for_paper("2308.07228")
have("2308.07228")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2308.07228.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2308.07228.svg)](https://syntology.ai/paper/2308.07228)

Connect an agent — have() is free.