SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.08448 · ICCV · 2023

Not All Steps are Created Equal: Selective Diffusion Distillation for Image Manipulation

Ying-Cong Chen, Shuai Yang, Shu Liu, Luozhou Wang

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 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/2307.08448.json · badge: /api/ran/2307.08448.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
AndysonYs/Selective-Diffusion-Distillation canonical (classifier label)
classifier basis: plan_row
7 ran · 0 no recorded run
FunctionStatusWhere it lives
fused_leaky_relu Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AndysonYs/Selective-Diffusion-Distillation/models/stylegan2/modules.py
code served (permissive licence) · get_code("61bfd1f9c061215b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 4, 5) 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 expects:
# - input: a tensor (either 3D or not 3D, let's test with 4D which is common for conv layers)
# - bias: a tensor with fewer dimensions than input
# - negative_slope: float (default 0.2)
# - scale: float (default 2**0.5)

# For a 4D input (batch, channels, height, width), bias typically has shape (channels,)
# The function does: bias.view(1, bias.shape[0], *rest_dim)
# where rest_dim = [1] * (input.ndim - bias.ndim - 1)

# Let's create a 4D input case:
# input: (2, 3, 4, 5) - batch=2, channels=3, height=4, width=5
# bias: (3,) - one bias per channel

input_4d = torch.randn(2, 3, 4, 5)
bias_4d = torch.randn(3)

ARGS = {
    'input': input_4d,
    'bias': bias_4d,
    'negative_slope': 0.2,
    'scale': 2 ** 0.5
}
Setup block drafted by
a language model, Claude Sonnet 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 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) 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_block Ran
ran, honoured the contract we drafted
AndysonYs/Selective-Diffusion-Distillation/loss/models/face_model.py
pointer only (licence: MIT); the stored copy get_code serves, from wty-ustc/hairclip, is pointer only (licence: LGPL-2.1) · get_code("b28543ed94f9d144")
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 wty-ustc/hairclip, and LGPL-2.1, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

get_blocks Ran
ran; our contract draft was wrong, not the code
AndysonYs/Selective-Diffusion-Distillation/loss/models/face_model.py
pointer only (licence: MIT); the stored copy get_code serves, from wty-ustc/hairclip, is pointer only (licence: LGPL-2.1) · get_code("d764d1b681a351f3")
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 wty-ustc/hairclip, and LGPL-2.1, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

get_keys Ran
ran; our contract draft was wrong, not the code
AndysonYs/Selective-Diffusion-Distillation/models/mapper/style_mapper.py
code served (permissive licence) · get_code("29b9a890f149a3a6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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
import torch.nn as nn

torch.manual_seed(0)

# Create a state dict that mimics a checkpoint with nested module names
# The function extracts keys that start with a specific name prefix
state_dict = {
    'encoder.layer1.weight': torch.randn(4, 3),
    'encoder.layer1.bias': torch.randn(4),
    'encoder.layer2.weight': torch.randn(5, 4),
    'encoder.layer2.bias': torch.randn(5),
    'decoder.layer1.weight': torch.randn(3, 5),
    'decoder.layer1.bias': torch.randn(3),
    'other.param': torch.randn(2, 2)
}

# Wrap it in a checkpoint-like dict (function checks for 'state_dict' key)
d = {'state_dict': state_dict, 'epoch': 10, 'optimizer': {}}

# Name to filter by
name = 'encoder'

ARGS = {
    'd': d,
    'name': name
}
Setup block drafted by
a language model, Claude Sonnet 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 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
l2_norm Ran
ran; our contract draft was wrong, not the code
AndysonYs/Selective-Diffusion-Distillation/loss/models/face_model.py
code served (permissive licence) · get_code("c54fea429589425d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 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)

input_tensor = torch.randn(2, 4)
axis = 1

ARGS = {
    'input': input_tensor,
    'axis': axis
}
Setup block drafted by
a language model, Claude Sonnet 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
upfirdn2d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AndysonYs/Selective-Diffusion-Distillation/models/stylegan2/modules.py
pointer only (licence: MIT); the stored copy get_code serves, from koushiksrivats/face_attribute_attack, is pointer only (licence: NONE) · get_code("238fedc043c13f62")
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 koushiksrivats/face_attribute_attack, 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.

upfirdn2d_native Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AndysonYs/Selective-Diffusion-Distillation/models/stylegan2/modules.py
pointer only (licence: MIT); the stored copy get_code serves, from koushiksrivats/face_attribute_attack, is pointer only (licence: NONE) · get_code("fe99cfd294676edb")
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 koushiksrivats/face_attribute_attack, 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.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 3 the same month, 3 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
l2_norm 29 other papers
19 dated earlier, 1 the same month, 9 later · 2 only as an assembly brick
1804.07573 (2018-04)
MobileFaceNets: Efficient CNNs for Accurate Real-Time Face Verification on Mobile Devices
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
and 26 more not named here
get_block 27 other papers
16 dated earlier, 1 the same month, 10 later
1804.07573 (2018-04)
MobileFaceNets: Efficient CNNs for Accurate Real-Time Face Verification on Mobile Devices
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set
1907.10830 (2019-07)
U-GAT-IT: Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation
and 24 more not named here
get_keys 14 other papers
11 dated earlier, 3 later
2008.00951 (2020-08)
Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation
2011.12799 (2020-11)
StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation
2103.17249 (2021-03)
StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery
and 11 more not named here
upfirdn2d_native 11 other papers
11 dated earlier · 5 only as an assembly brick
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
2103.17249 (2021-03)
StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery
2104.06820 (2021-04)
Few-shot Image Generation via Cross-domain Correspondence
and 8 more not named here
upfirdn2d 5 other papers
5 dated earlier · 4 only as an assembly brick
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
2103.17249 (2021-03)
StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery
2104.06820 (2021-04)
Few-shot Image Generation via Cross-domain Correspondence
and 2 more not named here
fused_leaky_relu 4 other papers
4 dated earlier · 2 only as an assembly brick
2011.12799 (2020-11)
StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation
2103.17249 (2021-03)
StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery
2104.06820 (2021-04)
Few-shot Image Generation via Cross-domain Correspondence
and 1 more not named here
get_blocks 4 other papers
3 dated earlier, 1 the same month
2008.00951 (2020-08)
Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation
2112.05142 (2021-12)
HairCLIP: Design Your Hair by Text and Reference Image
2203.08422 (2022-03)
Attribute Group Editing for Reliable Few-shot Image Generation
and 1 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

Conditional diffusion models have demonstrated impressive performance in image manipulation tasks. The general pipeline involves adding noise to the image and then denoising it. However, this method faces a trade-off problem: adding too much noise affects the fidelity of the image while adding too little affects its editability. This largely limits their practical applicability. In this paper, we propose a novel framework, Selective Diffusion Distillation (SDD), that ensures both the fidelity and editability of images. Instead of directly editing images with a diffusion model, we train a feedforward image manipulation network under the guidance of the diffusion model. Besides, we propose an effective indicator to select the semantic-related timestep to obtain the correct semantic guidance from the diffusion model. This approach successfully avoids the dilemma caused by the diffusion process. Our extensive experiments demonstrate the advantages of our framework. Code is released at https://github.com/AndysonYs/Selective-Diffusion-Distillation.

For agents

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

get_harvested_code_for_paper("2307.08448")
get_code_for_paper("2307.08448")
have("2307.08448")

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

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

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

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

Connect an agent — have() is free.