SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.02133 · 2023

Style Aligned Image Generation via Shared Attention

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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 0 have no contract verdict; 5 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/2312.02133.json · badge: /api/ran/2312.02133.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
google/style-aligned canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
calc_mean_std Ran
ran; our contract draft was wrong, not the code
google/style-aligned/sa_handler.py
code served (permissive licence) · get_code("9c9a27e0bc006a04")
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 5, 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)

# Create a small tensor with shape (batch, channels, height, width) or similar
# The function uses var(dim=-2) and mean(dim=-2), so we need at least 2 dimensions
# Let's create a 4D tensor: (batch=2, channels=3, height=4, width=5)
feat = torch.randn(2, 3, 4, 5)

# eps parameter - standard small float value
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 — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 5, 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
google/style-aligned/sa_handler.py
code served (permissive licence) · get_code("6589ee95023822c4")
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 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 — 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
concat_zero_control Ran
ran; our contract draft was wrong, not the code
google/style-aligned/pipeline_calls.py
code served (permissive licence) · get_code("d09f8becef1cafed")
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 (6, 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)

# The function takes control_residuel (a tensor) and:
# 1. Gets batch size b = shape[0] // 2
# 2. Creates a zero tensor with same shape as control_residuel[0:1]
# 3. Concatenates: zeros, control_residuel[:b], zeros, control_residuel[b:]
# So we need a tensor with even batch size (at least 2 to get b >= 1)

# Let's create a tensor with batch size 4, feature dim 3
control_residuel = torch.randn(4, 3)

ARGS = {
    "control_reisduel": control_residuel
}
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 (6, 3) — shape (6, 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
expand_first Ran
ran; our contract draft was wrong, not the code
google/style-aligned/sa_handler.py
code served (permissive licence) · get_code("8f99b8dcd10f16d5")
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 (4, 3, 5, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes a feature tensor and a scale parameter
# feat: should be a tensor with batch dimension and feature dimensions
# scale: a float multiplier (default 1.0)

# Analyzing the function:
# - feat.shape[0] is the batch size (b)
# - feat[0] and feat[b // 2] are indexed, so need at least 2 elements
# - feat.shape[1:] are the remaining dimensions
# - The function reshapes to feat.shape at the end
# - With scale != 1, it does operations on dimensions with 5 total dims (2, b//2, and 3 more from feat.shape[1:])

# Construct a small feature tensor: batch=4, with additional dimensions
feat = torch.randn(4, 3, 5, 2)

# scale can be 1.0 or something else
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 — 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 (4, 3, 5, 2) — shape (4, 3, 5, 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
get_depth_map Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
google/style-aligned/pipeline_calls.py
code served (permissive licence) · get_code("8bd813aca10aa53d")
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. 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 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
from PIL import Image
from transformers import DPTImageProcessor, DPTForDepthEstimation

torch.manual_seed(0)

# Create a minimal stand-in image
image = Image.new('RGB', (256, 256), color=(100, 150, 200))

# Create a mock DPTImageProcessor
class MockDPTImageProcessor:
    def __call__(self, images, return_tensors=None):
        # Return a mock result object with pixel_values attribute
        class ProcessorOutput:
            def __init__(self):
                self.pixel_values = torch.randn(1, 3, 384, 384)
        return ProcessorOutput()

feature_processor = MockDPTImageProcessor()

# Create a mock DPTForDepthEstimation
class MockDPTForDepthEstimation(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = torch.nn.Linear(1, 1)
    
    def forward(self, x):
        # Return a mock output with predicted_depth attribute
        class DepthOutput:
            def __init__(self):
                self.predicted_depth = torch.randn(1, 384, 384)
        return DepthOutput()

depth_estimator = MockDPTForDepthEstimation()

ARGS = {
    'image': image,
    'feature_processor': feature_processor,
    'depth_estimator': depth_estimator
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, transformers — 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 2 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
calc_mean_std 1 other paper
1 later
2402.12974 (2024-02)
Visual Style Prompting with Swapping Self-Attention
concat_first 1 other paper
1 later
2402.12974 (2024-02)
Visual Style Prompting with Swapping Self-Attention
expand_first 1 other paper
1 later
2402.12974 (2024-02)
Visual Style Prompting with Swapping Self-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

Large-scale Text-to-Image (T2I) models have rapidly gained prominence across creative fields, generating visually compelling outputs from textual prompts. However, controlling these models to ensure consistent style remains challenging, with existing methods necessitating fine-tuning and manual intervention to disentangle content and style. In this paper, we introduce StyleAligned, a novel technique designed to establish style alignment among a series of generated images. By employing minimal `attention sharing' during the diffusion process, our method maintains style consistency across images within T2I models. This approach allows for the creation of style-consistent images using a reference style through a straightforward inversion operation. Our method's evaluation across diverse styles and text prompts demonstrates high-quality synthesis and fidelity, underscoring its efficacy in achieving consistent style across various inputs.

For agents

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

get_harvested_code_for_paper("2312.02133")
get_code_for_paper("2312.02133")
have("2312.02133")

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

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

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

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

Connect an agent — have() is free.