SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.00289 · 2025

Dual Diffusion for Unified Image Generation and Understanding

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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, 1 violated it and 6 have no contract verdict; 1 failure of our instrument; 1 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/2501.00289.json · badge: /api/ran/2501.00289.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
zijieli-Jlee/Dual-Diffusion community (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_shift Ran
ran, violated the contract we drafted
zijieli-Jlee/Dual-Diffusion/sd3_modules/dual_diff_pipeline.py
code served (permissive licence) · get_code("4e3ad3679e5c37b2")
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 float, ndim 0, dtype family float, shape () 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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - image_seq_len: a numeric value (int or float) representing sequence length
# - base_seq_len: int, default 256
# - max_seq_len: int, default 4096
# - base_shift: float, default 0.5
# - max_shift: float, default 1.16
# The function performs linear interpolation calculations on these numeric values

ARGS = {
    "image_seq_len": 512,
    "base_seq_len": 256,
    "max_seq_len": 4096,
    "base_shift": 0.5,
    "max_shift": 1.16
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
compute_density_for_timestep_sampling Ran
ran on a synthesized input
zijieli-Jlee/Dual-Diffusion/sd3_modules/sd3_training_utils.py
code served (permissive licence) · get_code("a6cb835becfb9125")
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 1, dtype family float, shape (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
import math

torch.manual_seed(0)

ARGS = {
    'weighting_scheme': 'logit_normal',
    'batch_size': 2,
    'logit_mean': 0.0,
    'logit_std': 1.0,
    'mode_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 1, dtype family float, shape (2,) — shape (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
compute_loss_weighting_for_sd3 Ran
ran on a synthesized input
zijieli-Jlee/Dual-Diffusion/sd3_modules/sd3_training_utils.py
code served (permissive licence) · get_code("43e67a426c782b94")
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 1, dtype family float, shape (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
import math

torch.manual_seed(0)

# Create sigmas tensor - small tensor for testing
sigmas = torch.tensor([0.1, 0.5, 0.9, 1.0], dtype=torch.float32)

ARGS = {
    'weighting_scheme': 'sigma_sqrt',
    'sigmas': sigmas
}
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 1, dtype family float, shape (4,) — shape (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
gradnorm Ran
ran on a synthesized input
zijieli-Jlee/Dual-Diffusion/sd3_modules/sd_loss_utils.py
code served (permissive licence) · get_code("7a16f09fe2ddb9f5")
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)

# The function 'gradnorm' takes a single parameter 'x' which should be a tensor
# Looking at the forward method, it clones x, so x must be a tensor
# Looking at the backward method, it computes norm and normalizes grad_output

# Create a small tensor to pass as x
x = torch.randn(2, 4, requires_grad=True)

ARGS = {
    'x': x
}
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
load_json Ran
ran on a synthesized input
zijieli-Jlee/Dual-Diffusion/custom_dataset/iterable_data.py
code served (permissive licence) · get_code("d91cfae999630304")
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 tempfile
import os

# Create a temporary JSON file with sample metadata
temp_dir = tempfile.mkdtemp()
json_file_path = os.path.join(temp_dir, "test_metadata.json")

sample_metadata = {
    "name": "test_model",
    "version": "1.0",
    "layers": 3,
    "hidden_dim": 256,
    "tags": ["nlp", "transformer"]
}

with open(json_file_path, 'w') as f:
    json.dump(sample_metadata, f)

ARGS = {
    "file_path": json_file_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
prepare_text_inputs Ran
ran on a synthesized input
zijieli-Jlee/Dual-Diffusion/sd3_modules/dual_diff_pipeline.py
code served (permissive licence) · get_code("b23cf8649eb8c230")
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 (2, 3, 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
import torch.nn as nn

torch.manual_seed(0)

class TextEncoder3(nn.Module):
    def __init__(self, hidden_size=4):
        super().__init__()
        self.linear = nn.Linear(hidden_size, hidden_size)
    
    def forward(self, input_ids, attention_mask=None):
        batch_size = input_ids.shape[0]
        seq_length = input_ids.shape[1]
        hidden_size = 4
        embeds = torch.randn(batch_size, seq_length, hidden_size)
        return (embeds,)

class ModelPipe(nn.Module):
    def __init__(self):
        super().__init__()
        self.text_encoder_3 = TextEncoder3(hidden_size=4)

model_pipe = ModelPipe()

t5_input_ids = torch.randint(0, 100, (2, 3))
attention_mask = torch.ones((2, 3), dtype=torch.long)

ARGS = {
    "model_pipe": model_pipe,
    "t5_input_ids": t5_input_ids,
    "attention_mask": attention_mask,
}
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 (2, 3, 4) — shape (2, 3, 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
prepare_text_inputs Ran
ran on a synthesized input
zijieli-Jlee/Dual-Diffusion/sd3_modules/sd_loss_utils.py
code served (permissive licence) · get_code("fcf8e44c9540403a")
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, 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 as nn

torch.manual_seed(0)

class MockTextEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.embed = nn.Linear(4, 8)
    
    def forward(self, input_ids, attention_mask=None):
        # Return a tuple where first element is embeddings
        batch_size = input_ids.shape[0]
        embeddings = self.embed(input_ids.float())
        return (embeddings, None)

class MockModelPipe(nn.Module):
    def __init__(self):
        super().__init__()
        self.text_encoder_3 = MockTextEncoder()

model_pipe = MockModelPipe()

t5_input_ids = torch.randint(0, 100, (2, 4))
attention_mask = torch.ones((2, 4))

ARGS = {
    "model_pipe": model_pipe,
    "t5_input_ids": t5_input_ids,
    "attention_mask": attention_mask,
    "disable_grad": True
}
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, 8) — shape (2, 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
retrieve_timesteps Ran
ran; our contract draft was wrong, not the code
zijieli-Jlee/Dual-Diffusion/sd3_modules/dual_diff_pipeline.py
pointer only (licence: MIT); the stored copy get_code serves, from krafton-ai/Rare-to-Frequent, is pointer only (licence: NONE) · get_code("0b56680ee1708fee")
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 krafton-ai/Rare-to-Frequent, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_logger Not yet run
unverified (harvested, no recorded run)
zijieli-Jlee/Dual-Diffusion/train_dual_diffusion_sd3.py
code served (permissive licence) · get_code("cab1caee58ae7b81")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 3 later) and 6 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
retrieve_timesteps 46 other papers
14 dated earlier, 2 the same month, 27 later, 1 same year, order not determinable, 2 undated
2312.04461 (2023-12)
PhotoMaker: Customizing Realistic Human Photos via Stacked ID Embedding
2402.10491 (2024-02)
Make a Cheap Scaling: A Self-Cascade Diffusion Model for Higher-Resolution Adaptation
2405.18991 (2024-05)
EasyAnimate: High-Performance Video Generation Framework with Hybrid Windows Attention and Reward Backpropagation
and 43 more not named here
calculate_shift 15 other papers
6 dated earlier, 8 later, 1 same year, order not determinable
2406.04312 (2024-06)
ReNO: Enhancing One-step Text-to-Image Models through Reward-based Noise Optimization
2410.22376 (2024-10)
Rare-to-Frequent: Unlocking Compositional Generation Power of Diffusion Models on Rare Concepts with LLM Guidance
2411.06558 (2024-11)
Region-Aware Text-to-Image Generation via Hard Binding and Soft Refinement
and 12 more not named here
create_logger 14 other papers
10 dated earlier, 4 later
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
2405.20337 (2024-05)
OccSora: 4D Occupancy Generation Models as World Simulators for Autonomous Driving
2406.01733 (2024-06)
Learning-to-Cache: Accelerating Diffusion Transformer via Layer Caching
and 11 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

Diffusion models have gained tremendous success in text-to-image generation, yet still lag behind with visual understanding tasks, an area dominated by autoregressive vision-language models. We propose a large-scale and fully end-to-end diffusion model for multi-modal understanding and generation that significantly improves on existing diffusion-based multimodal models, and is the first of its kind to support the full suite of vision-language modeling capabilities. Inspired by the multimodal diffusion transformer (MM-DiT) and recent advances in discrete diffusion language modeling, we leverage a cross-modal maximum likelihood estimation framework that simultaneously trains the conditional likelihoods of both images and text jointly under a single loss function, which is back-propagated through both branches of the diffusion transformer. The resulting model is highly flexible and capable of a wide range of tasks including image generation, captioning, and visual question answering. Our model attained competitive performance compared to recent unified image understanding and generation models, demonstrating the potential of multimodal diffusion modeling as a promising alternative to autoregressive next-token prediction models.

For agents

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

get_harvested_code_for_paper("2501.00289")
get_code_for_paper("2501.00289")
have("2501.00289")

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

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

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

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

Connect an agent — have() is free.