SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.03119 · CVPR · 2023

Zero-shot Generative Model Adaptation via Image-specific Prompt Learning

Gao Huang, Shiji Song, Kai Wang, Humphrey Shi, You Wu, Jiayi Guo, Chaofei Wang, Eric Zhang, Xingqian Xu

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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, 1 violated it and 5 have no contract verdict; 2 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/2304.03119.json · badge: /api/ran/2304.03119.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
picsart-ai-research/ipl-zero-shot-generative-model-adaptation canonical (classifier label)
classifier basis not recorded on the link
9 ran · 1 no recorded run
FunctionStatusWhere it lives
conv2d Ran
ran; our contract draft was wrong, not the code
picsart-ai-research/ipl-zero-shot-generative-model-adaptation/op/conv2d_gradfix.py
code served (permissive licence) · get_code("76042afc43214587")
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 (2, 5, 2, 2) 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create input tensor: batch_size=2, channels=3, height=4, width=4
input_tensor = torch.randn(2, 3, 4, 4, requires_grad=True)

# Create weight tensor: out_channels=5, in_channels=3, kernel_h=3, kernel_w=3
weight_tensor = torch.randn(5, 3, 3, 3, requires_grad=True)

# Create bias tensor: out_channels=5
bias_tensor = torch.randn(5, requires_grad=True)

ARGS = {
    'input': input_tensor,
    'weight': weight_tensor,
    'bias': bias_tensor,
    'stride': 1,
    'padding': 0,
    'dilation': 1,
    'groups': 1,
}
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 4, dtype family float, shape (2, 5, 2, 2) — shape (2, 5, 2, 2) 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
conv_transpose2d Ran
ran; our contract draft was wrong, not the code
picsart-ai-research/ipl-zero-shot-generative-model-adaptation/op/conv2d_gradfix.py
code served (permissive licence) · get_code("5f98b4db51504bf7")
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 (2, 5, 6, 6) 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small input tensor: (batch=2, channels=3, height=4, width=4)
input_tensor = torch.randn(2, 3, 4, 4, requires_grad=True)

# Create weight tensor for transpose convolution
# For conv_transpose2d: weight shape is (in_channels, out_channels/groups, kH, kW)
# We use in_channels=3, out_channels=5, kernel=3x3
weight_tensor = torch.randn(3, 5, 3, 3, requires_grad=True)

# Create bias tensor: (out_channels,)
bias_tensor = torch.randn(5, requires_grad=True)

ARGS = {
    'input': input_tensor,
    'weight': weight_tensor,
    'bias': bias_tensor,
    'stride': 1,
    'padding': 0,
    'output_padding': 0,
    'groups': 1,
    'dilation': 1,
}
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 4, dtype family float, shape (2, 5, 6, 6) — shape (2, 5, 6, 6) 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
could_use_op Ran
ran on a synthesized input
picsart-ai-research/ipl-zero-shot-generative-model-adaptation/op/conv2d_gradfix.py
code served (permissive licence) · get_code("ce977f8c2571b94b")
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 bool, ndim 0, dtype family float, shape () 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small tensor on CPU
# The function checks input.device.type and input attributes
input_tensor = torch.randn(2, 4, 8, 8)

ARGS = {
    'input': input_tensor
}
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 bool, 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
get_dir_img_list Ran
ran on a synthesized input
picsart-ai-research/ipl-zero-shot-generative-model-adaptation/utils/file_utils.py
code served (permissive licence) · get_code("3a7d1325f2373282")
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. 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 os
import tempfile
import shutil

# Create a temporary directory with some test image files
temp_dir = tempfile.mkdtemp()

# Create some dummy image files with valid extensions
test_files = ['image1.png', 'image2.jpg', 'image3.jpeg', 'notimage.txt', 'photo.PNG']
for filename in test_files:
    filepath = os.path.join(temp_dir, filename)
    with open(filepath, 'w') as f:
        f.write('dummy content')

ARGS = {
    'dir_path': temp_dir,
    'valid_exts': ['.png', '.jpg', '.jpeg']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
make_kernel Ran
ran, violated the contract we drafted
picsart-ai-research/ipl-zero-shot-generative-model-adaptation/model/sg2_model.py
pointer only (licence: MIT); the stored copy get_code serves, from dkn16/multi-fidel-gan-21cm, is pointer only (licence: NOASSERTION) · get_code("6f65e378a4313f87")
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 dkn16/multi-fidel-gan-21cm, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

make_noise Ran
ran on a synthesized input
picsart-ai-research/ipl-zero-shot-generative-model-adaptation/utils/training_utils.py
code served (permissive licence) · get_code("6503cdd2ec3fa92b")
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 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)

ARGS = {
    "batch": 2,
    "latent_dim": 4,
    "n_noise": 1,
    "device": "cpu"
}
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 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
mixing_noise Ran
ran, honoured the contract we drafted
picsart-ai-research/ipl-zero-shot-generative-model-adaptation/utils/training_utils.py
code served (permissive licence) · get_code("5bdf4a93a7f8170f")
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 tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was 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 random

torch.manual_seed(0)

ARGS = {
    'batch': 2,
    'latent_dim': 4,
    'prob': 0.5,
    'device': 'cpu'
}
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 tuple, ndim 3, dtype family float — a tuple 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
resize_img Ran
ran on a synthesized input
picsart-ai-research/ipl-zero-shot-generative-model-adaptation/utils/file_utils.py
code served (permissive licence) · get_code("9ec031b7d74a4c7d")
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 3, dtype family float, shape (3, 8, 8) 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 image tensor
# The function expects img to be a tensor that can be unsqueezed to add batch dim
# Standard image format: (C, H, W) where C=channels, H=height, W=width
img = torch.randn(3, 4, 5)

# size parameter is an integer representing target size
size = 8

ARGS = {
    "img": img,
    "size": size,
}
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 3, dtype family float, shape (3, 8, 8) — shape (3, 8, 8) 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_native Ran
ran on a synthesized input
picsart-ai-research/ipl-zero-shot-generative-model-adaptation/op/upfirdn2d.py
code served (permissive licence) · get_code("6f6832bdac56cd3b")
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 (2, 3, 8, 10) 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)

# Create input tensor: (batch=2, channels=3, height=4, width=5)
input_tensor = torch.randn(2, 3, 4, 5)

# Create kernel tensor: (kernel_h=3, kernel_w=3)
kernel = torch.randn(3, 3)

# Upsampling factors
up_x = 2
up_y = 2

# Downsampling factors
down_x = 1
down_y = 1

# Padding parameters
pad_x0 = 1
pad_x1 = 1
pad_y0 = 1
pad_y1 = 1

ARGS = {
    "input": input_tensor,
    "kernel": kernel,
    "up_x": up_x,
    "up_y": up_y,
    "down_x": down_x,
    "down_y": down_y,
    "pad_x0": pad_x0,
    "pad_x1": pad_x1,
    "pad_y0": pad_y0,
    "pad_y1": pad_y1,
}
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 4, dtype family float, shape (2, 3, 8, 10) — shape (2, 3, 8, 10) 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)
picsart-ai-research/ipl-zero-shot-generative-model-adaptation/utils/training_utils.py
code served (permissive licence) · get_code("cc3f32980660c458")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 7 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 2 later) and 3 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
make_kernel 40 other papers
32 dated earlier, 8 later · 10 only as an assembly brick
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
and 37 more not named here
conv2d 3 other papers
3 dated earlier
2110.04627 (2021-10)
Vector-quantized Image Modeling with Improved VQGAN
2112.11641 (2021-12)
JoJoGAN: One Shot Face Stylization
2203.14954 (2022-03)
GIRAFFE HD: A High-Resolution 3D-aware Generative Model
conv_transpose2d 3 other papers
3 dated earlier
2110.04627 (2021-10)
Vector-quantized Image Modeling with Improved VQGAN
2112.11641 (2021-12)
JoJoGAN: One Shot Face Stylization
2203.14954 (2022-03)
GIRAFFE HD: A High-Resolution 3D-aware Generative Model
could_use_op 2 other papers
2 dated earlier
2110.04627 (2021-10)
Vector-quantized Image Modeling with Improved VQGAN
2203.14954 (2022-03)
GIRAFFE HD: A High-Resolution 3D-aware Generative Model
upfirdn2d_native 2 other papers
2 later
2305.00942 (2023-05)
StyleAvatar: Real-time Photo-realistic Portrait Avatar from a Single Video
2311.14097 (2023-11)
ACT-Diffusion: Efficient Adversarial Consistency Training for One-step Diffusion Models
make_noise 1 other paper
1 dated earlier
2211.13227 (2022-11)
Paint by Example: Exemplar-based Image Editing with Diffusion Models
mixing_noise 1 other paper
1 dated earlier
2211.13227 (2022-11)
Paint by Example: Exemplar-based Image Editing with Diffusion Models

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

Ours "Wall painting" Ours "Anime painting" Ours "Photo" Source "Ukiyo-e" Ours NADA NADA NADA NADA Figure 1. The mode collapse issue. For NADA [21] and our method, the same generator pre-trained on the source domain of "Photo" is adapted to the unseen target domains of "Disney", "Anime painting", "Wall painting" and "Ukiyo-e" only with the domain labels. The images above the dotted line are some examples from the internet. The generated images of NADA exhibit some similar unseen patterns (yellow box areas) which are undesired in terms of quality and diversity. This issue is largely addressed by our method.

For agents

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

get_harvested_code_for_paper("2304.03119")
get_code_for_paper("2304.03119")
have("2304.03119")

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

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

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

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

Connect an agent — have() is free.