SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.07015 · 2023

Exploiting Diffusion Prior for Real-World Image Super-Resolution

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 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; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 7 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2305.07015.json · badge: /api/ran/2305.07015.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
naagar/art_restoration_dm community (classifier label)
classifier basis not recorded on the link
8 ran · 3 no recorded run
FunctionStatusWhere it lives
AttentionBlock Ran
ran; our contract draft was wrong, not the code
naagar/art_restoration_dm/basicsr/archs/dfdnet_util.py
pointer only (licence: MIT); the stored copy get_code serves, from RuoyuGuo/P-PatchDiff, is pointer only (licence: NONE) · get_code("8d3cd21cd5c3181a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from RuoyuGuo/P-PatchDiff, 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.

adaptive_instance_normalization Ran
ran; our contract draft was wrong, not the code
naagar/art_restoration_dm/basicsr/archs/dfdnet_util.py
pointer only (licence: MIT); the stored copy get_code serves, from RuoyuGuo/P-PatchDiff, is pointer only (licence: NONE) · get_code("b7c6741eed724350")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from RuoyuGuo/P-PatchDiff, 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.

calc_mean_std Ran
ran; our contract draft was wrong, not the code
naagar/art_restoration_dm/basicsr/archs/dfdnet_util.py
pointer only (licence: MIT); the stored copy get_code serves, from RuoyuGuo/P-PatchDiff, is pointer only (licence: NONE) · get_code("a7e8af4ef5efc131")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from RuoyuGuo/P-PatchDiff, 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.

gradient_penalty_loss Ran
ran; our contract draft was wrong, not the code
naagar/art_restoration_dm/basicsr/losses/gan_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from CUHK-AIM-Group/MedVSR, is pointer only (licence: NONE) · get_code("81eb425a41a7c2a1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from CUHK-AIM-Group/MedVSR, 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.

read_image Ran
ran on a synthesized input
naagar/art_restoration_dm/predict.py
code served (permissive licence) · get_code("14e53ebc4163f8f2")
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 Tensor, ndim 4, dtype family float, shape (1, 3, 3, 4) as a later run recorded it. 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, 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 numpy as np
import torch
from PIL import Image
import io

torch.manual_seed(0)

# Create a small test image in memory
# Create a simple RGB image (3x4 pixels)
img_array = np.random.randint(0, 256, (3, 4, 3), dtype=np.uint8)
img = Image.fromarray(img_array, mode='RGB')

# Save to bytes buffer
img_buffer = io.BytesIO()
img.save(img_buffer, format='PNG')
img_buffer.seek(0)

# Write to a temporary file path (we'll mock this with a string)
# Since we can't do file I/O, we need to create a minimal mock
class MockImagePath:
    def __str__(self):
        return "mock_image.png"
    
    def __fspath__(self):
        return "mock_image.png"

# Create a temporary actual file for the test
import tempfile
import os

temp_dir = tempfile.gettempdir()
test_image_path = os.path.join(temp_dir, "test_image_temp.png")
img.save(test_image_path)

ARGS = {
    "im_path": test_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 3, 3, 4) — shape (1, 3, 3, 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
reduce_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
naagar/art_restoration_dm/basicsr/losses/loss_util.py
code served (permissive licence) · get_code("a648a03a952822c0")
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 Tensor, ndim 0, dtype family float, 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.functional as F

torch.manual_seed(0)

# Create a small elementwise loss tensor (batch=2, elements=4)
loss = torch.tensor([[0.5, 1.2, 0.3, 0.8], [0.9, 0.4, 1.1, 0.6]], dtype=torch.float32)

# Test with 'mean' reduction
reduction = 'mean'

ARGS = {
    'loss': loss,
    'reduction': reduction,
}
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 Tensor, ndim 0, dtype family float, 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
space_timesteps Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
naagar/art_restoration_dm/predict.py
code served (permissive licence) · get_code("047ee806479be1ed")
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 set. 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
import numpy as np

# Analyze the function to understand what arguments are needed:
# - num_timesteps: an integer representing total number of timesteps
# - section_counts: either a string starting with 'ddim' followed by a number,
#                   a comma-separated string of integers, or a list of integers

# Test case 1: Using a simple list of section counts
ARGS = {
    "num_timesteps": 100,
    "section_counts": [10, 20, 30]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
weight_reduce_loss Ran
ran; our contract draft was wrong, not the code
naagar/art_restoration_dm/basicsr/losses/loss_util.py
code served (permissive licence) · get_code("1ba39317ea81871a")
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 Tensor, ndim 0, dtype family float, 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.functional as F

torch.manual_seed(0)

# Create a small loss tensor (batch_size=2, num_elements=4)
loss = torch.rand(2, 4)

# Create a weight tensor with matching dimensions
# weight.dim() == loss.dim() and weight.size(1) == loss.size(1)
weight = torch.rand(2, 4)

# Test different reduction modes
reduction = 'mean'

ARGS = {
    'loss': loss,
    'weight': weight,
    'reduction': reduction
}
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 Tensor, ndim 0, dtype family float, 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
g_path_regularize Not yet run
unverified (harvested, no recorded run)
naagar/art_restoration_dm/basicsr/losses/gan_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from CUHK-AIM-Group/MedVSR, is pointer only (licence: NONE) · get_code("fe05416387de89c6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from CUHK-AIM-Group/MedVSR, 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. No invocation recorded.

r1_penalty Not yet run
unverified (harvested, no recorded run)
naagar/art_restoration_dm/basicsr/losses/gan_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from CUHK-AIM-Group/MedVSR, is pointer only (licence: NONE) · get_code("c7cba9053f3cadb5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from CUHK-AIM-Group/MedVSR, 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. No invocation recorded.

weighted_loss Not yet run
unverified (harvested, no recorded run)
naagar/art_restoration_dm/basicsr/losses/loss_util.py
code served (permissive licence) · get_code("cf63f8afc13f62a7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 1 the same month, 10 later) and 1 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
space_timesteps 57 other papers
9 dated earlier, 1 the same month, 46 later, 1 same year, order not determinable · 2 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
and 54 more not named here
weighted_loss 44 other papers
8 dated earlier, 33 later, 3 same year, order not determinable
136790177 (2022 (year only))
Frequency and Spatial Dual Guidance for Image Dehazing
2203.14216 (2022-03)
Efficient and Degradation-Adaptive Network for Real-World Image Super-Resolution
2205.05996 (2022-05)
Blueprint Separable Residual Network for Efficient Image Super-Resolution
and 41 more not named here
reduce_loss 43 other papers
8 dated earlier, 33 later, 2 same year, order not determinable
136790177 (2022 (year only))
Frequency and Spatial Dual Guidance for Image Dehazing
2203.14216 (2022-03)
Efficient and Degradation-Adaptive Network for Real-World Image Super-Resolution
2205.05996 (2022-05)
Blueprint Separable Residual Network for Efficient Image Super-Resolution
and 40 more not named here
weight_reduce_loss 43 other papers
8 dated earlier, 32 later, 3 same year, order not determinable
136790177 (2022 (year only))
Frequency and Spatial Dual Guidance for Image Dehazing
2203.14216 (2022-03)
Efficient and Degradation-Adaptive Network for Real-World Image Super-Resolution
2205.05996 (2022-05)
Blueprint Separable Residual Network for Efficient Image Super-Resolution
and 40 more not named here
g_path_regularize 18 other papers
2 dated earlier, 16 later
2207.13784 (2022-07)
AvatarPoser: Articulated Full-Body Pose Tracking from Sparse Motion Sensing
2303.17783 (2023-03)
Uncertainty-Aware Source-Free Adaptive Image Super-Resolution with Wavelet Augmentation Transformer
2308.03448 (2023-08)
Make Explicit Calibration Implicit: Calibrate Denoiser Instead of the Noise Model
and 15 more not named here
gradient_penalty_loss 18 other papers
2 dated earlier, 16 later
2207.13784 (2022-07)
AvatarPoser: Articulated Full-Body Pose Tracking from Sparse Motion Sensing
2303.17783 (2023-03)
Uncertainty-Aware Source-Free Adaptive Image Super-Resolution with Wavelet Augmentation Transformer
2308.03448 (2023-08)
Make Explicit Calibration Implicit: Calibrate Denoiser Instead of the Noise Model
and 15 more not named here
r1_penalty 18 other papers
2 dated earlier, 16 later
2207.13784 (2022-07)
AvatarPoser: Articulated Full-Body Pose Tracking from Sparse Motion Sensing
2303.17783 (2023-03)
Uncertainty-Aware Source-Free Adaptive Image Super-Resolution with Wavelet Augmentation Transformer
2308.03448 (2023-08)
Make Explicit Calibration Implicit: Calibrate Denoiser Instead of the Noise Model
and 15 more not named here
adaptive_instance_normalization 16 other papers
2 dated earlier, 13 later, 1 same year, order not determinable
Wang_Deep_Arbitrary-Scale_Image_Super-Resolution_via_Scale-Equivariance_Pursuit_CVPR_2023_paper (2023 (year only))
Deep Arbitrary-Scale Image Super-Resolution via Scale-Equivariance Pursuit
2303.04970 (2023-03)
LMR: A Large-Scale Multi-Reference Dataset for Reference-based Super-Resolution
2304.01064 (2023-04)
Real-time 6K Image Rescaling with Rate-distortion Optimization
and 13 more not named here
AttentionBlock 14 other papers
2 dated earlier, 11 later, 1 same year, order not determinable
Wang_Deep_Arbitrary-Scale_Image_Super-Resolution_via_Scale-Equivariance_Pursuit_CVPR_2023_paper (2023 (year only))
Deep Arbitrary-Scale Image Super-Resolution via Scale-Equivariance Pursuit
2303.04970 (2023-03)
LMR: A Large-Scale Multi-Reference Dataset for Reference-based Super-Resolution
2304.01064 (2023-04)
Real-time 6K Image Rescaling with Rate-distortion Optimization
and 11 more not named here
calc_mean_std 14 other papers
2 dated earlier, 11 later, 1 same year, order not determinable
Wang_Deep_Arbitrary-Scale_Image_Super-Resolution_via_Scale-Equivariance_Pursuit_CVPR_2023_paper (2023 (year only))
Deep Arbitrary-Scale Image Super-Resolution via Scale-Equivariance Pursuit
2303.04970 (2023-03)
LMR: A Large-Scale Multi-Reference Dataset for Reference-based Super-Resolution
2304.01064 (2023-04)
Real-time 6K Image Rescaling with Rate-distortion Optimization
and 11 more not named here

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-22.

Repositories linked to this paper

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

Abstract

We present a novel approach to leverage prior knowledge encapsulated in pre-trained text-to-image diffusion models for blind super-resolution (SR). Specifically, by employing our time-aware encoder, we can achieve promising restoration results without altering the pre-trained synthesis model, thereby preserving the generative prior and minimizing training cost. To remedy the loss of fidelity caused by the inherent stochasticity of diffusion models, we employ a controllable feature wrapping module that allows users to balance quality and fidelity by simply adjusting a scalar value during the inference process. Moreover, we develop a progressive aggregation sampling strategy to overcome the fixed-size constraints of pre-trained diffusion models, enabling adaptation to resolutions of any size. A comprehensive evaluation of our method using both synthetic and real-world benchmarks demonstrates its superiority over current state-of-the-art approaches. Code and models are available at https://github.com/IceClear/StableSR.

For agents

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

get_harvested_code_for_paper("2305.07015")
get_code_for_paper("2305.07015")
have("2305.07015")

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

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

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

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

Connect an agent — have() is free.