SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2508.03256 · ICCV · 2025

Beyond Isolated Words: Diffusion Brush for Handwritten Text-Line Generation

Yifan Zhang, Shuicheng Yan, Shuangping Huang, Gang Dai, Yutao Qin, Qiangya Guo

arXiv · PDF · Open in the Atlas

Code that ran

11 of 20 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (8 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 10 have no contract verdict; 1 failure of our instrument; 9 no recorded run), measured 2026-11-24; 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/2508.03256.json · badge: /api/ran/2508.03256.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
dailenson/DiffBrush community
Papers with Code archive
11 ran · 9 no recorded run
FunctionStatusWhere it lives
BasicBlock Ran
ran on a synthesized input · constructed an object; no result was computed
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("3eeb7ad3e51182b6")
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 an instance of its own class, BasicBlock: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "in_channels": 3,
    "out_channels": 64,
    "stride": 1,
    "dilation": 1,
    "first_dilation": False,
}
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 BasicBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BasicBlock 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
BasicTransformerBlock Ran
ran on a synthesized input · constructed an object; no result was computed
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("560b9460a4ba3c95")
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 an instance of its own class, BasicTransformerBlock: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "dim": 64,
    "n_heads": 4,
    "d_head": 16,
    "dropout": 0.1,
    "context_dim": 64,
    "gated_ff": True,
    "checkpoint": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BasicTransformerBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BasicTransformerBlock 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
CheckpointFunction Ran
ran on a synthesized input · constructed an object; no result was computed
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("513f01ae3d65b92a")
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 an instance of its own class, CheckpointFunction: the run constructed the object and did not call it, so no result was computed. 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)

# Define a simple run_function that takes input tensors and produces output tensors
def simple_run_function(x, y):
    """A simple function that takes two tensors and returns their sum"""
    return x + y

# Create small input tensors with distinct shapes
input_tensor_1 = torch.randn(2, 4, requires_grad=True)
input_tensor_2 = torch.randn(2, 3, requires_grad=True)

# Create parameter tensors (these are the "params" that don't require grad initially in forward)
param_tensor_1 = torch.randn(4, 5, requires_grad=True)
param_tensor_2 = torch.randn(3, 6, requires_grad=True)

# Number of input tensors (used to split args into input_tensors and input_params)
length = 2

# Construct the arguments tuple:
# forward(ctx, run_function, length, *args)
# where *args = input_tensors + input_params
args = (
    simple_run_function,  # run_function
    length,               # length
    input_tensor_1,       # first input tensor
    input_tensor_2,       # second input tensor
    param_tensor_1,       # first param
    param_tensor_2,       # second param
)

ARGS = {
    "run_function": simple_run_function,
    "length": length,
    "args": args[2:]  # The *args part after run_function and length
}
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 CheckpointFunction — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CheckpointFunction 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
CrossAttention Ran
ran on a synthesized input · constructed an object; no result was computed
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("aaf73d2a3d84cc5b")
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 an instance of its own class, CrossAttention: the run constructed the object and did not call it, so no result was computed. 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
from torch import einsum
from einops import rearrange, repeat
from inspect import isfunction

torch.manual_seed(0)

def default(val, d):
    if val is not None:
        return val
    return d() if isfunction(d) else d

def exists(val):
    return val is not None

def max_neg_value(t):
    return -torch.finfo(t.dtype).max

class CrossAttention(nn.Module):

    def __init__(self, query_dim, context_dim=None, heads=8, dim_head=64, dropout=0.0):
        super().__init__()
        inner_dim = dim_head * heads
        context_dim = default(context_dim, query_dim)
        self.scale = dim_head ** (-0.5)
        self.heads = heads
        self.to_q = nn.Linear(query_dim, inner_dim, bias=False)
        self.to_kv = nn.Linear(context_dim, inner_dim * 2, bias=False)
        self.to_k = nn.Linear(context_dim, inner_dim, bias=False)
        self.to_v = nn.Linear(context_dim, inner_dim, bias=False)
        self.to_out = nn.Sequential(nn.Linear(inner_dim, query_dim), nn.Dropout(dropout))

    def forward(self, x, context=None, mask=None):
        h = self.heads
        q = self.to_q(x)
        context = default(context, x)
        k = self.to_k(context)
        v = self.to_v(context)
        q, k, v = map(lambda t: rearrange(t, 'b n (h d) -> (b h) n d', h=h).contiguous(), (q, k, v))
        sim = einsum('b i d, b j d -> b i j', q, k) * self.scale
        if exists(mask):
            mask = rearrange(mask, 'b j -> b 1 1 j').contiguous()
            max_neg_value = -torch.finfo(sim.dtype).max
            sim.masked_fill_(~mask, max_neg_value)
        attn = sim.softmax(dim=-1)
        out = einsum('b i j, b j d -> b i d', attn, v)
        out = rearrange(out, '(b h) n d -> b n (h d)', h=h).contiguous()
        return self.to_out(out)

query_dim = 16
context_dim = 20
heads = 4
dim_head = 8
dropout = 0.1

# Create the CrossAttention module
cross_attn = CrossAttention(
    query_dim=query_dim,
    context_dim=context_dim,
    heads=heads,
    dim_head=dim_head,
    dropout=dropout
)

# Create input tensors
batch_size = 2
seq_len_q = 3
seq_len_ctx = 5

x = torch.randn(batch_size, seq_len_q, query_dim)
context = torch.randn(batch_size, seq_len_ctx, context_dim)
mask = torch.ones(batch_size, seq_len_ctx, dtype=torch.bool)

ARGS = {
    'query_dim': query_dim,
    'context_dim': context_dim,
    'heads': heads,
    'dim_head': dim_head,
    'dropout': dropout
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CrossAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CrossAttention 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
Downsample Ran
ran on a synthesized input · constructed an object; no result was computed
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("763eaf30a7ec2801")
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 an instance of its own class, Downsample: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "channels": 3,
    "use_conv": True,
    "dims": 2,
    "out_channels": 16,
    "padding": 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 Downsample — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Downsample 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
Proxy_Anchor Ran
ran on a synthesized input · constructed an object; no result was computed
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("ca7d14825009b1a7")
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 an instance of its own class, Proxy_Anchor: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

# Parameters for Proxy_Anchor
nb_classes = 3
sz_embed = 4
mrg = 0.1
alpha = 32
proxy_mode = 'only_real'

ARGS = {
    'nb_classes': nb_classes,
    'sz_embed': sz_embed,
    'mrg': mrg,
    'alpha': alpha,
    'proxy_mode': proxy_mode
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Proxy_Anchor — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Proxy_Anchor 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
QKVAttention Ran
ran on a synthesized input
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("a527744b4c918a23")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 math
import numpy as np
import torch
import torch.nn as nn

def count_flops_attn(model, _x, y):
    """
    A counter for the `thop` package to count the operations in an
    attention operation.
    Meant to be used like:
        macs, params = thop.profile(
            model,
            inputs=(inputs, timestamps),
            custom_ops={QKVAttention: QKVAttention.count_flops},
        )
    """
    b, c, *spatial = y[0].shape
    num_spatial = int(np.prod(spatial))
    matmul_ops = 2 * b * num_spatial ** 2 * c
    model.total_ops += torch.DoubleTensor([matmul_ops])

class QKVAttention(nn.Module):
    """
    A module which performs QKV attention and splits in a different order.
    """

    def __init__(self, n_heads):
        super().__init__()
        self.n_heads = n_heads

    def forward(self, qkv):
        """
        Apply QKV attention.
        :param qkv: an [N x (3 * H * C) x T] tensor of Qs, Ks, and Vs.
        :return: an [N x (H * C) x T] tensor after attention.
        """
        bs, width, length = qkv.shape
        assert width % (3 * self.n_heads) == 0
        ch = width // (3 * self.n_heads)
        q, k, v = qkv.chunk(3, dim=1)
        scale = 1 / math.sqrt(math.sqrt(ch))
        weight = torch.einsum('bct,bcs->bts', (q * scale).view(bs * self.n_heads, ch, length), (k * scale).view(bs * self.n_heads, ch, length))
        weight = torch.softmax(weight.float(), dim=-1).type(weight.dtype)
        a = torch.einsum('bts,bcs->bct', weight, v.reshape(bs * self.n_heads, ch, length))
        return a.reshape(bs, -1, length)

    @staticmethod
    def count_flops(model, _x, y):
        return count_flops_attn(model, _x, y)


INIT_ARGS = {
    'n_heads': 2,
}

ARGS = {
    'qkv': torch.randn(2, 12, 5),
}

if __name__ == '__main__':
    model = QKVAttention(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
QKVAttentionLegacy Ran
ran on a synthesized input
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("7f426ee49ae356e0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 math
import numpy as np
import torch
import torch.nn as nn

def count_flops_attn(model, _x, y):
    """
    A counter for the `thop` package to count the operations in an
    attention operation.
    Meant to be used like:
        macs, params = thop.profile(
            model,
            inputs=(inputs, timestamps),
            custom_ops={QKVAttention: QKVAttention.count_flops},
        )
    """
    b, c, *spatial = y[0].shape
    num_spatial = int(np.prod(spatial))
    matmul_ops = 2 * b * num_spatial ** 2 * c
    model.total_ops += torch.DoubleTensor([matmul_ops])

class QKVAttentionLegacy(nn.Module):
    """
    A module which performs QKV attention. Matches legacy QKVAttention + input/ouput heads shaping
    """

    def __init__(self, n_heads):
        super().__init__()
        self.n_heads = n_heads

    def forward(self, qkv):
        """
        Apply QKV attention.
        :param qkv: an [N x (H * 3 * C) x T] tensor of Qs, Ks, and Vs.
        :return: an [N x (H * C) x T] tensor after attention.
        """
        bs, width, length = qkv.shape
        assert width % (3 * self.n_heads) == 0
        ch = width // (3 * self.n_heads)
        q, k, v = qkv.reshape(bs * self.n_heads, ch * 3, length).split(ch, dim=1)
        scale = 1 / math.sqrt(math.sqrt(ch))
        weight = torch.einsum('bct,bcs->bts', q * scale, k * scale)
        weight = torch.softmax(weight.float(), dim=-1).type(weight.dtype)
        a = torch.einsum('bts,bcs->bct', weight, v)
        return a.reshape(bs, -1, length)

    @staticmethod
    def count_flops(model, _x, y):
        return count_flops_attn(model, _x, y)


INIT_ARGS = {
    'n_heads': 2,
}

ARGS = {
    'qkv': torch.randn(2, 12, 5),
}

if __name__ == '__main__':
    model = QKVAttentionLegacy(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ResNet Ran
ran on a synthesized input · constructed an object; no result was computed
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("cc61b25b0388b42d")
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 an instance of its own class, ResNet: the run constructed the object and did not call it, so no result was computed. 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)

class BasicBlock(nn.Module):
    expansion = 1
    
    def __init__(self, in_channels, out_channels, stride=1, dilation=1, downsample_residual=False):
        super().__init__()
        self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=3, stride=stride, padding=1, bias=False)
        self.bn1 = nn.BatchNorm2d(out_channels)
        self.relu = nn.ReLU(inplace=True)
        self.conv2 = nn.Conv2d(out_channels, out_channels, kernel_size=3, stride=1, padding=1, bias=False)
        self.bn2 = nn.BatchNorm2d(out_channels)
        
        self.downsample = None
        if stride != 1 or in_channels != out_channels:
            self.downsample = nn.Sequential(
                nn.Conv2d(in_channels, out_channels, kernel_size=1, stride=stride, bias=False),
                nn.BatchNorm2d(out_channels)
            )
    
    def forward(self, x):
        identity = x
        out = self.conv1(x)
        out = self.bn1(out)
        out = self.relu(out)
        out = self.conv2(out)
        out = self.bn2(out)
        
        if self.downsample is not None:
            identity = self.downsample(x)
        
        out += identity
        out = self.relu(out)
        return out

ARGS = {
    "block": BasicBlock,
    "num_block": [2, 2, 2, 2],
    "num_classes": 10
}
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 ResNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResNet 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
Upsample Ran
ran on a synthesized input · constructed an object; no result was computed
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("f827e7bcb16c1d75")
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 an instance of its own class, Upsample: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "channels": 4,
    "use_conv": True,
    "dims": 2,
    "out_channels": 8,
    "padding": 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 Upsample — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Upsample 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
timestep_embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("1b261a79cdace383")
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 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 math
import torch
from einops import rearrange, repeat

torch.manual_seed(0)

# Create timesteps tensor: 1-D tensor of N indices
timesteps = torch.tensor([0.0, 1.0], dtype=torch.float32)

# Dimension of output
dim = 4

# Max period parameter
max_period = 10000

# repeat_only flag
repeat_only = False

ARGS = {
    "timesteps": timesteps,
    "dim": dim,
    "max_period": max_period,
    "repeat_only": repeat_only,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
einops, 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
AttentionBlock Not yet run
unverified (harvested, no recorded run)
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("5e204acfe6ae38ac")
How it ran

no invocation recorded.

Mix_TR Not yet run
unverified (harvested, no recorded run)
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("4dab4ad094e29ef2")
How it ran

no invocation recorded.

ResBlock Not yet run
unverified (harvested, no recorded run)
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("9d2fcaf8335c2210")
How it ran

no invocation recorded.

SpatialTransformer Not yet run
unverified (harvested, no recorded run)
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("a0fe4952c73f4e10")
How it ran

no invocation recorded.

TimestepBlock Not yet run
unverified (harvested, no recorded run)
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("6f183b4bfe4ad68f")
How it ran

no invocation recorded.

TimestepEmbedSequential Not yet run
unverified (harvested, no recorded run)
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("661d22c736946198")
How it ran

no invocation recorded.

UNetModel Not yet run
unverified (harvested, no recorded run)
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("3761e7a226193538")
How it ran

no invocation recorded.

checkpoint Not yet run
unverified (harvested, no recorded run)
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("06599f1e1f23a978")
How it ran

no invocation recorded.

count_flops_attn Not yet run
unverified (harvested, no recorded run)
dailenson/DiffBrush/models/unet.py
code served (permissive licence) · get_code("d147ee9b766a6934")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 3 later) and 14 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
checkpoint
brick of this paper's assembly: helper
51 other papers
48 dated earlier, 3 later · 29 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2110.11291 (2021-10)
Likelihood Training of Schrödinger Bridge using Forward-Backward SDEs Theory
and 48 more not named here
timestep_embedding
brick of this paper's assembly: helper
25 other papers
22 dated earlier, 3 later · 8 only as an assembly brick
2202.06875 (2022-02)
Visual Acoustic Matching
2301.05225 (2023-01)
Domain Expansion of Image Generators
2302.07685 (2023-02)
Video Probabilistic Diffusion Models in Projected Latent Space
and 22 more not named here
TimestepEmbedSequential
brick of this paper's assembly: model
8 other papers
7 dated earlier, 1 later
2301.05225 (2023-01)
Domain Expansion of Image Generators
2302.07685 (2023-02)
Video Probabilistic Diffusion Models in Projected Latent Space
2304.02012 (2023-04)
EGC: Image Generation and Classification via a Diffusion Energy-Based Model
and 5 more not named here
QKVAttention
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
QKVAttentionLegacy
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
count_flops_attn
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion

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

Repositories linked to this paper

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

Abstract

Existing handwritten text generation methods primarily focus on isolated words. However, realistic handwritten text demands attention not only to individual words but also to the relationships between them, such as vertical alignment and horizontal spacing. Therefore, generating entire text line emerges as a more promising and comprehensive task. However, this task poses significant challenges, including the accurate modeling of complex style patterns-encompassing both intra-and inter-word relationships-and maintaining content accuracy across numerous characters. To address these challenges, we propose DiffBrush, a novel diffusion-based model for handwritten text-line generation. Unlike existing methods, Diff-Brush excels in both style imitation and content accuracy through two key strategies: (1) content-decoupled style learning, which disentangles style from content to better capture intra-word and inter-word style patterns by using column-and row-wise masking; and (2) multi-scale content learning, which employs line and word discriminators to ensure global coherence and local accuracy of textual content. Extensive experiments show that DiffBrush excels in generating high-quality text-lines, particularly in style reproduction and content preservation. Code is available at https://github.com/dailenson/DiffBrush

For agents

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

get_harvested_code_for_paper("2508.03256")
get_code_for_paper("2508.03256")
have("2508.03256")

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

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

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

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

Connect an agent — have() is free.