SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.12974 · 2024

Visual Style Prompting with Swapping Self-Attention

arXiv · PDF · Open in the Atlas

Code that ran

16 of 16 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; 13 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/2402.12974.json · badge: /api/ran/2402.12974.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
naver-ai/Visual-Style-Prompting canonical (classifier label)
classifier basis: census
16 ran · 0 no recorded run
FunctionStatusWhere it lives
calc_mean_std Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/pipelines/inverted_ve_pipeline.py
code served (permissive licence) · get_code("8d0ce4c22eacc88f")
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 4, 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

torch.manual_seed(0)

# The function calc_mean_std takes a tensor 'feat' and computes mean and std
# along dimension -2 (second-to-last dimension).
# It uses:
# - feat.var(dim=-2, keepdims=True)
# - feat.mean(dim=-2, keepdims=True)
# - .sqrt() method
# So we need a tensor with at least 2 dimensions

# Create a small tensor with shape (2, 4, 3) 
# This gives us dimension -2 = 4, dimension -1 = 3
feat = torch.randn(2, 4, 3)

eps = 1e-05

ARGS = {
    "feat": feat,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, 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
concat_first Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/pipelines/inverted_ve_pipeline.py
code served (permissive licence) · get_code("94f2cc13633a334f")
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, 4, 6, 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)

# Create a small feature tensor with batch size 2
# Shape: (batch=2, channels=4, height=3, width=5)
feat = torch.randn(2, 4, 3, 5)

ARGS = {
    "feat": feat,
    "dim": 2,
    "scale": 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — 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, 4, 6, 5) — shape (2, 4, 6, 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
create_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
naver-ai/Visual-Style-Prompting/visualize_attention_src/utils.py
code served (permissive licence) · get_code("91fbd520765aec84")
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 Image. 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.

from PIL import Image

ARGS = {
    'row': 2,
    'col': 3,
    'image_size': 1024,
    'grid_width': 1,
    'background_color': (255, 255, 255),
    'top_padding': 0,
    'bottom_padding': 0,
    'left_padding': 0,
    'right_padding': 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
create_image_grid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
naver-ai/Visual-Style-Prompting/visualize_attention_src/save_attn_map_script.py
code served (permissive licence) · get_code("8a18eb1d9dfeff92")
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 Image. 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.

from PIL import Image

# Create a list of small PIL images
image_list = [
    Image.new('RGB', (100, 80), color=(255, 0, 0)),
    Image.new('RGB', (100, 80), color=(0, 255, 0)),
    Image.new('RGB', (100, 80), color=(0, 0, 255)),
    Image.new('RGB', (100, 80), color=(255, 255, 0)),
]

ARGS = {
    'image_list': image_list,
    'rows': 2,
    'cols': 2,
    'padding': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
create_nested_list Ran
ran, honoured the contract we drafted
naver-ai/Visual-Style-Prompting/vsp_real_script.py
code served (permissive licence) · get_code("840989d505e53791")
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 2, dtype family int; 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

torch.manual_seed(0)

ARGS = {
    't': 5
}
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 2, dtype family int — 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
create_number_list Ran
ran, honoured the contract we drafted
naver-ai/Visual-Style-Prompting/vsp_real_script.py
code served (permissive licence) · get_code("a9df142d09608ec2")
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 int; 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 numpy as np

torch.manual_seed(0)

# Analyze the function: create_number_list(n)
# The function takes a single parameter 'n' and returns list(range(n + 1))
# 'n' should be an integer

ARGS = {
    "n": 5
}
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 list, ndim 1, dtype family int — 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
create_prompt Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/vsp_real_script.py
code served (permissive licence) · get_code("56be14bdb80a0850")
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 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.

# Setup code for create_prompt function

ARGS = {
    'style_name': 'kids drawing'
}
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 tuple, ndim 1, 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
expand_first Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/pipelines/inverted_ve_pipeline.py
code served (permissive licence) · get_code("197b9e6865c65770")
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 (4, 3, 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:
# - feat: a tensor with shape (b, *other_dims) where b is batch size
# - scale: a float (default 1.0)

# Looking at the function body:
# - feat.shape[0] accesses batch dimension
# - feat[0] and feat[b // 2] index into batch dimension
# - feat.shape[1:] gets remaining dimensions
# - For scale==1: expand(2, b//2, *feat.shape[1:])
# - For scale!=1: repeat and reshape operations
# - Final reshape to (*feat.shape)

# Create a small tensor: batch=4, then some feature dimensions (3, 5)
feat = torch.randn(4, 3, 5)
scale = 1.0

ARGS = {
    "feat": feat,
    "scale": scale,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — 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 (4, 3, 5) — shape (4, 3, 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_image Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/visualize_attention_src/utils.py
code served (permissive licence) · get_code("93d7815126d56733")
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 Image. 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.

from PIL import Image
import numpy as np

# Create a small test image (RGB)
img_array = np.random.randint(0, 256, (2048, 2048, 3), dtype=np.uint8)
test_image = Image.fromarray(img_array)

# Save temporarily to create a path (or pass the Image object directly)
# Since we can't do file I/O, we'll pass the Image object directly
image_obj = test_image

ARGS = {
    "image_path": image_obj,
    "row": 0,
    "col": 1,
    "image_size": 1024,
    "grid_width": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
get_image_v2 Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/visualize_attention_src/utils.py
code served (permissive licence) · get_code("a9908edbd73a4ea0")
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 Image. 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.

from PIL import Image
import io

# Create a small test image
img_width = 4096
img_height = 4096
test_image = Image.new('RGB', (img_width, img_height), color='red')

ARGS = {
    'image_path': test_image,
    'row': 0,
    'col': 0,
    'image_size': 1024,
    'grid_row_space': 1,
    'grid_col_space': 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
init_latent Ran
ran, honoured the contract we drafted
naver-ai/Visual-Style-Prompting/utils.py
code served (permissive licence) · get_code("05ba22d160ba005c")
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, 4, 64, 64) 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
from diffusers.utils.torch_utils import randn_tensor

torch.manual_seed(0)

# Create a minimal mock model with the required attributes
class MockUNetConfig:
    def __init__(self):
        self.in_channels = 4

class MockUNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.config = MockUNetConfig()

class MockVAE(nn.Module):
    def __init__(self):
        super().__init__()

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.vae_scale_factor = 8
        self.default_sample_size = 64
        self.unet = MockUNet()
        self.vae = MockVAE()

# Instantiate the mock model
model = MockModel()

ARGS = {
    'model': model,
    'device_name': 'cpu',
    'dtype': torch.float32,
    'seed': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
diffusers, 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, 4, 64, 64) — shape (1, 4, 64, 64) 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
load_config Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/utils.py
code served (permissive licence) · get_code("8c171e27e9c1a1d0")
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. 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

torch.manual_seed(0)

config = {
    'inference_info': {
        'activate_layer_indices_list': [0, 1, 2],
        'activate_step_indices_list': [5, 10, 15],
        'inf_seeds': [42, 43],
        'attn_map_save_steps': [1, 2, 3],
        'use_negative_prompt': True,
        'inf_object_list': ['object1', 'object2'],
        'with_style_description': True,
        'use_shared_attention': False,
        'adain_queries': True,
        'adain_keys': False,
        'adain_values': True,
        'use_advanced_sampling': False,
    },
    'reference_info': {
        'ref_seeds': [40, 41],
        'ref_object_list': ['ref_obj1', 'ref_obj2'],
        'with_style_description': True,
    },
    'precomputed_path': '/tmp/precomputed',
    'guidance_scale': 7.5,
    'style_name_list': ['style1', 'style2'],
}

ARGS = {
    'config': config,
}
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 list — a list output has no array shape of its own; none is 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
parse_config Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/utils.py
code served (permissive licence) · get_code("6b7da58f659741f1")
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 json
import os
import tempfile

# Create a temporary directory and config file
temp_dir = tempfile.mkdtemp()
config_path = os.path.join(temp_dir, "config.json")

# Write a valid JSON config file
config_data = {
    "model": "test_model",
    "learning_rate": 0.001,
    "batch_size": 32,
    "epochs": 10,
    "layers": [64, 128, 256]
}

with open(config_path, 'w') as f:
    json.dump(config_data, f)

# Define ARGS with the config file path
ARGS = {
    "config": config_path
}
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 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
rescale_noise_cfg Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/visualize_attention_src/pipeline_stable_diffusion_xl_attn.py
code served (permissive licence) · get_code("bea2d776a332f2b0")
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 4, dtype family float, shape (2, 4, 3, 3) 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)

# Create small tensors with distinct dimensions
# noise_cfg: shape (batch=2, channels=4, height=3, width=3)
noise_cfg = torch.randn(2, 4, 3, 3)

# noise_pred_text: shape (batch=2, channels=4, height=3, width=3)
noise_pred_text = torch.randn(2, 4, 3, 3)

# guidance_rescale: float between 0 and 1
guidance_rescale = 0.7

ARGS = {
    "noise_cfg": noise_cfg,
    "noise_pred_text": noise_pred_text,
    "guidance_rescale": guidance_rescale,
}
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 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) 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
transform_variable_name Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/visualize_attention_src/save_attn_map_script.py
code served (permissive licence) · get_code("9483beae09eebf51")
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 str. 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)

# Analyze the function:
# - input_str: a string that will be split by '.' into parts
#   The function expects parts to be parseable as:
#   indices[0] through indices[6], where some are digits (converted to int) and some are strings
#   Specifically: indices[0], [1], [3], [5] appear to be used in indexing (int)
#   and indices[2], [4], [6] appear to be used as attribute names (strings)
# - attn_map_save_step: an integer used in the final f-string

# Construct a valid input_str that will split into 7 parts with the expected pattern
# Pattern: int.int.string.int.string.int.string
input_str = "0.1.layer.2.attention.3.head"

# attn_map_save_step should be an integer
attn_map_save_step = 5

ARGS = {
    "input_str": input_str,
    "attn_map_save_step": attn_map_save_step,
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
zero_module Ran
ran; our contract draft was wrong, not the code
naver-ai/Visual-Style-Prompting/pipelines/controlnet.py
code served (permissive licence) · get_code("da94debb8019ad46")
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 SimpleModule. 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
from torch import nn

torch.manual_seed(0)

# Create a simple neural network module with some parameters
class SimpleModule(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

# Instantiate the module
module = SimpleModule()

# Define the ARGS dictionary
ARGS = {
    "module": module
}
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 SimpleModule — a SimpleModule output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModule 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

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 2 later) and 11 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
rescale_noise_cfg 62 other papers
14 dated earlier, 2 the same month, 45 later, 1 same year, order not determinable
2206.02779 (2022-06)
Blended Latent Diffusion
2304.06720 (2023-04)
Expressive Text-to-Image Generation with Rich Text
2309.06380 (2023-09)
InstaFlow: One Step is Enough for High-Quality Diffusion-Based Text-to-Image Generation
and 59 more not named here
zero_module 40 other papers
11 dated earlier, 27 later, 2 same year, order not determinable
2305.13077 (2023-05)
ControlVideo: Training-free Controllable Text-to-Video Generation
2305.17098 (2023-05)
ControlVideo: Conditional Control for One-shot Text-driven Video Editing and Beyond
2308.03448 (2023-08)
Make Explicit Calibration Implicit: Calibrate Denoiser Instead of the Noise Model
and 37 more not named here
calc_mean_std 1 other paper
1 dated earlier
2312.02133 (2023-12)
Style Aligned Image Generation via Shared Attention
concat_first 1 other paper
1 dated earlier
2312.02133 (2023-12)
Style Aligned Image Generation via Shared Attention
expand_first 1 other paper
1 dated earlier
2312.02133 (2023-12)
Style Aligned Image Generation via Shared Attention

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

In the evolving domain of text-to-image generation, diffusion models have emerged as powerful tools in content creation. Despite their remarkable capability, existing models still face challenges in achieving controlled generation with a consistent style, requiring costly fine-tuning or often inadequately transferring the visual elements due to content leakage. To address these challenges, we propose a novel approach, \ours, to produce a diverse range of images while maintaining specific style elements and nuances. During the denoising process, we keep the query from original features while swapping the key and value with those from reference features in the late self-attention layers. This approach allows for the visual style prompting without any fine-tuning, ensuring that generated images maintain a faithful style. Through extensive evaluation across various styles and text prompts, our method demonstrates superiority over existing approaches, best reflecting the style of the references and ensuring that resulting images match the text prompts most accurately. Our project page is available https://curryjung.github.io/VisualStylePrompt/.

For agents

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

get_harvested_code_for_paper("2402.12974")
get_code_for_paper("2402.12974")
have("2402.12974")

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

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

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

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

Connect an agent — have() is free.