SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.23905 · NeurIPS · 2024

Text-DiFuse: An Interactive Multi-Modal Image Fusion Framework based on Text-modulated Diffusion Model

Hao Zhang, Lei Cao, Jaiyi Ma

arXiv · PDF · Open in the Atlas

Code that ran

17 of 25 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 1 violated it and 4 have no contract verdict; 9 failures of our instrument; 8 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/2410.23905.json · badge: /api/ran/2410.23905.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
Leiii-Cao/Text-DiFuse canonical (classifier label)
classifier basis: census
12 ran · 8 no recorded run
leiii-cao/text-difuse community
Papers with Code archive
5 ran · 0 no recorded run
FunctionStatusWhere it lives
CBAM Ran
ran on a synthesized input · constructed an object; no result was computed
leiii-cao/text-difuse/diffusion_fusion/unet.py
code served (permissive licence) · get_code("2aaae79c9ede0635")
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, CBAM: 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)

# CBAM expects:
# - channel: int (number of channels in the input tensor)
# The forward method expects:
# - x: tensor of shape (batch, channel, height, width)

# Set up a small input tensor
batch_size = 2
channels = 4
height = 3
width = 5

# Create input tensor
x = torch.randn(batch_size, channels, height, width)

ARGS = {
    "channel": channels
}
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 CBAM — 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 CBAM 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
ChannelAttentionModule Ran
ran on a synthesized input · constructed an object; no result was computed
leiii-cao/text-difuse/diffusion_fusion/unet.py
code served (permissive licence) · get_code("4b4b3d10f2b6b2ea")
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, ChannelAttentionModule: 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)

# The ChannelAttentionModule expects:
# - channel: int (number of channels in the input tensor)
# - ratio: int (optional, defaults to 16)
# 
# The forward method expects:
# - x: tensor of shape (batch, channel, height, width)

# Create a small input tensor with batch=2, channels=4, height=3, width=5
batch_size = 2
channels = 4
height = 3
width = 5

x = torch.randn(batch_size, channels, height, width)

ARGS = {
    "channel": channels,
    "ratio": 16
}
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 ChannelAttentionModule — 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 ChannelAttentionModule 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
Get_Fusion_Control_Model Ran
ran on a synthesized input · constructed an object; no result was computed
leiii-cao/text-difuse/diffusion_fusion/unet.py
code served (permissive licence) · get_code("7d354c931a8b73fb")
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, Get_Fusion_Control_Model: 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)

# The Get_Fusion_Control_Model.forward() takes h1 and h2 as inputs
# h1 and h2 are concatenated on dim=1, so they must have the same spatial dims but can differ in channels
# After concatenation, the result has in_channels=1088
# So h1 and h2 should each have 544 channels (544 + 544 = 1088)
# Let's use batch_size=2, height=4, width=3 for small tensors

batch_size = 2
h1_channels = 544
h2_channels = 544
height = 4
width = 3

# Create dummy input tensors
h1 = torch.randn(batch_size, h1_channels, height, width)
h2 = torch.randn(batch_size, h2_channels, height, width)

ARGS = {
    "in_channels": 1088,
    "model_channels": 544,
}
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 Get_Fusion_Control_Model — 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 Get_Fusion_Control_Model 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
SpatialAttentionModule Ran
ran on a synthesized input
leiii-cao/text-difuse/diffusion_fusion/unet.py
code served (permissive licence) · get_code("3e2d5f9fbded1106")
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 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
import torch.nn as nn

class SpatialAttentionModule(nn.Module):

    def __init__(self):
        super(SpatialAttentionModule, self).__init__()
        self.conv2d = nn.Conv2d(in_channels=2, out_channels=1, kernel_size=7, stride=1, padding=3)
        self.sigmoid = nn.Sigmoid()

    def forward(self, x):
        avgout = torch.mean(x, dim=1, keepdim=True)
        maxout, _ = torch.max(x, dim=1, keepdim=True)
        out = torch.cat([avgout, maxout], dim=1)
        out = self.sigmoid(self.conv2d(out))
        return out


INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 4, 8, 6)
}

if __name__ == '__main__':
    module = SpatialAttentionModule(**INIT_ARGS)
    output = module(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.shape}")
    print(f"Output:\n{output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — 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)
Spit_feature_all Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Leiii-Cao/Text-DiFuse/diffusion_fusion/gaussian_diffusion.py
code served (permissive licence) · get_code("4e5dd44f6551d1d8")
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. 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)

# Analyze the function to understand what's needed:
# - feature_hidden_fusion is a 4D tensor with shape (B, C_, H, W)
# - The function slices it along the channel dimension and reshapes pieces
# - We need to construct a tensor with enough channels to accommodate all the slicing

# Calculate total channels needed:
# - First slice: 2 channels for feature_hidden (C_ - 2 to C_)
# - Then in the loop, we iterate through skip_channel_list (15 items)
# - skip_channel_list sums to: 2+2+2+6+6+4+16+16+8+32+32+32+128+128+128 = 642
# - Total needed: 2 + 642 = 644 channels

skip_channel_list = [2, 2, 2, 6, 6, 4, 16, 16, 8, 32, 32, 32, 128, 128, 128]
total_channels_needed = 2 + sum(skip_channel_list)  # 644

B = 2  # batch size
C_ = total_channels_needed
H = 256  # height, must be divisible by 16
W = 240  # width, must be divisible by 16, and distinct from H for probing

# Create a random tensor with the required shape
feature_hidden_fusion = torch.randn(B, C_, H, W)

ARGS = {
    "feature_hidden_fusion": feature_hidden_fusion
}
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 tuple — a tuple 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
approx_standard_normal_cdf Ran
ran; our contract draft was wrong, not the code
Leiii-Cao/Text-DiFuse/diffusion_fusion/losses.py
code served (permissive licence) · get_code("f15aa225ff9ad213")
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 numpy as np
import torch

torch.manual_seed(0)

# The function takes a single parameter 'x' which is used in torch operations
# It should be a torch tensor (or something that works with torch operations)
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
create_named_schedule_sampler Ran
ran; our contract draft was wrong, not the code
Leiii-Cao/Text-DiFuse/diffusion_fusion/resample.py
code served (permissive licence) · get_code("34431d326a1db3be")
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 UniformSampler. 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)

class MockDiffusion:
    """Minimal diffusion object with required attributes."""
    def __init__(self, num_timesteps=10):
        self.num_timesteps = num_timesteps

diffusion = MockDiffusion(num_timesteps=10)

ARGS = {
    'name': 'uniform',
    'diffusion': diffusion,
}
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 UniformSampler — a UniformSampler output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a UniformSampler 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
create_window Ran
ran, honoured the contract we drafted
Leiii-Cao/Text-DiFuse/diffusion_fusion/util.py
code served (permissive licence) · get_code("667496bffcb3922d")
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 (3, 1, 5, 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
from math import exp

torch.manual_seed(0)

ARGS = {
    "window_size": 5,
    "channel": 3
}
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 (3, 1, 5, 5) — shape (3, 1, 5, 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
discretized_gaussian_log_likelihood Ran
ran; our contract draft was wrong, not the code
Leiii-Cao/Text-DiFuse/diffusion_fusion/losses.py
code served (permissive licence) · get_code("9665e15b8cd77a32")
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
import numpy as np

torch.manual_seed(0)

# Create small test tensors
batch_size = 2
dim = 4

# x: target images rescaled to [-1, 1]
x = torch.randn(batch_size, dim) * 0.5

# means: Gaussian mean, same shape as x
means = torch.randn(batch_size, dim) * 0.3

# log_scales: Gaussian log stddev, same shape as x
log_scales = torch.randn(batch_size, dim) * 0.1

ARGS = {
    "x": x,
    "means": means,
    "log_scales": log_scales,
}
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 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
gaussian Ran
ran, honoured the contract we drafted
Leiii-Cao/Text-DiFuse/diffusion_fusion/util.py
code served (permissive licence) · get_code("c813c3992f7b56da")
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 (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
from math import exp

torch.manual_seed(0)

ARGS = {
    "window_size": 5,
    "sigma": 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 (5,) — shape (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_named_beta_schedule Ran
ran, honoured the contract we drafted
Leiii-Cao/Text-DiFuse/diffusion_fusion/gaussian_diffusion.py
pointer only (licence: MIT); the stored copy get_code serves, from NVlabs/DiffPure, is pointer only (licence: NOASSERTION) · get_code("a086d6286a40b889")
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 NVlabs/DiffPure, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

group_norm Ran
ran; our contract draft was wrong, not the code
leiii-cao/text-difuse/diffusion_fusion/unet.py
code served (permissive licence) · get_code("2d450c485d6f0636")
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 GroupNorm. 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)

# The function takes one parameter: channels
# It constructs a GroupNorm layer with 32 groups and the given number of channels
# channels must be an integer that is divisible by the number of groups (32)

ARGS = {
    "channels": 64
}
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 GroupNorm — a GroupNorm output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GroupNorm 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
is_image_file Ran
ran, violated the contract we drafted
Leiii-Cao/Text-DiFuse/diffusion_fusion/util.py
code served (permissive licence) · get_code("eb656fe08a6a70c4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. 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

# The function is_image_file takes one parameter: filename
# It checks if the filename ends with any of the image extensions
# We need to provide a string filename as the argument

ARGS = {
    "filename": "test_image.jpg"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normal_kl Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Leiii-Cao/Text-DiFuse/diffusion_fusion/losses.py
code served (permissive licence) · get_code("4707efa98ac6b989")
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)

# Create small tensors for KL divergence computation
# The function expects mean and logvar parameters for two Gaussians
mean1 = torch.randn(2, 4)
logvar1 = torch.randn(2, 4)
mean2 = torch.randn(2, 4)
logvar2 = torch.randn(2, 4)

ARGS = {
    "mean1": mean1,
    "logvar1": logvar1,
    "mean2": mean2,
    "logvar2": logvar2,
}
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
space_timesteps Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Leiii-Cao/Text-DiFuse/diffusion_fusion/respace.py
code served (permissive licence) · get_code("48416fe6fb1e3520")
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 set. 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

# Set random seed for reproducibility
torch.manual_seed(0)

# Define ARGS dictionary with valid arguments for space_timesteps
ARGS = {
    "num_timesteps": 300,
    "section_counts": [10, 15, 20]
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
time_embedding Ran
ran; our contract draft was wrong, not the code
Leiii-Cao/Text-DiFuse/diffusion_fusion/unet.py
code served (permissive licence) · get_code("6ddd349a862de98b")
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
import math

torch.manual_seed(0)

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

# Dimension of output embedding
dim = 4

# Max period parameter (default value)
max_period = 10000

ARGS = {
    "timesteps": timesteps,
    "dim": dim,
    "max_period": max_period,
}
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
zero_module Ran
ran; our contract draft was wrong, not the code
Leiii-Cao/Text-DiFuse/diffusion_fusion/nn_util.py
code served (permissive licence) · get_code("129b804760b3115f")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple module with some parameters
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.conv = nn.Conv1d(2, 2, 3)
    
    def forward(self, x):
        return x

module = SimpleModule()

# Verify the module has non-zero parameters before zeroing
for p in module.parameters():
    assert p.abs().sum() > 0, "Parameters should be non-zero initially"

ARGS = {
    "module": module
}
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 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
Get_feature_all Not yet run
unverified (harvested, no recorded run)
Leiii-Cao/Text-DiFuse/diffusion_fusion/gaussian_diffusion.py
code served (permissive licence) · get_code("bd2216dfcf7872aa")
How it ran

no invocation recorded.

avg_pool_nd Not yet run
unverified (harvested, no recorded run)
Leiii-Cao/Text-DiFuse/diffusion_fusion/nn_util.py
code served (permissive licence) · get_code("ecd0fc28815b65ae")
How it ran

no invocation recorded.

conv_nd Not yet run
unverified (harvested, no recorded run)
Leiii-Cao/Text-DiFuse/diffusion_fusion/nn_util.py
code served (permissive licence) · get_code("fe4eb545bbb728e0")
How it ran

no invocation recorded.

create_model_and_diffusion Not yet run
unverified (harvested, no recorded run)
Leiii-Cao/Text-DiFuse/diffusion_fusion/script_util.py
code served (permissive licence) · get_code("d9013b673760ac7c")
How it ran

no invocation recorded.

detect_objects Not yet run
unverified (harvested, no recorded run)
Leiii-Cao/Text-DiFuse/modulated/util.py
code served (permissive licence) · get_code("6e228e6f353adfc1")
How it ran

no invocation recorded.

diffusion_stage1_create_model Not yet run
unverified (harvested, no recorded run)
Leiii-Cao/Text-DiFuse/diffusion_fusion/script_util.py
code served (permissive licence) · get_code("630ea2365cd982bf")
How it ran

no invocation recorded.

diffusion_stage2_create_model Not yet run
unverified (harvested, no recorded run)
Leiii-Cao/Text-DiFuse/diffusion_fusion/script_util.py
code served (permissive licence) · get_code("59ec9ffb7aaf338a")
How it ran

no invocation recorded.

load_owlvit Not yet run
unverified (harvested, no recorded run)
Leiii-Cao/Text-DiFuse/modulated/util.py
code served (permissive licence) · get_code("b930371b74e318b8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 25 samples lifted from this paper's linked repositories, 25 carry a function identity and 0 do not. Of the 25 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 5 the same month, 9 later) and 16 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
zero_module 196 other papers
149 dated earlier, 6 the same month, 40 later, 1 same year, order not determinable · 49 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
and 193 more not named here
conv_nd 121 other papers
94 dated earlier, 4 the same month, 20 later, 3 same year, order not determinable · 32 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 118 more not named here
avg_pool_nd 113 other papers
91 dated earlier, 4 the same month, 15 later, 3 same year, order not determinable · 31 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2110.11291 (2021-10)
Likelihood Training of Schrödinger Bridge using Forward-Backward SDEs Theory
and 110 more not named here
get_named_beta_schedule 63 other papers
53 dated earlier, 1 the same month, 8 later, 1 same year, order not determinable
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2108.02938 (2021-08)
ILVR: Conditioning Method for Denoising Diffusion Probabilistic Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 60 more not named here
is_image_file 62 other papers
58 dated earlier, 2 later, 2 same year, order not determinable
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
1703.07511 (2017-03)
Deep Photo Style Transfer
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
and 59 more not named here
normal_kl 34 other papers
27 dated earlier, 7 later
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2209.15421 (2022-09)
TabDDPM: Modelling Tabular Data with Diffusion Models
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
and 31 more not named here
create_window 19 other papers
12 dated earlier, 1 the same month, 6 later
1812.11941 (2018-12)
High Quality Monocular Depth Estimation via Transfer Learning
Zavrtanik_DRAEM_-_A_Discriminatively_Trained_Reconstruction_Embedding_for_Surface_Anomaly_ICCV_2021_paper (2021 (year only))
DRAEM -A discriminatively trained reconstruction embedding for surface anomaly detection
2108.07610 (2021-08)
DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detection
and 16 more not named here
approx_standard_normal_cdf 10 other papers
8 dated earlier, 2 later
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2209.15421 (2022-09)
TabDDPM: Modelling Tabular Data with Diffusion Models
and 7 more not named here
discretized_gaussian_log_likelihood 8 other papers
6 dated earlier, 2 later
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2209.15421 (2022-09)
TabDDPM: Modelling Tabular Data with Diffusion Models
and 5 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

Existing multi-modal image fusion methods fail to address the compound degradations presented in source images, resulting in fusion images plagued by noise, color bias, improper exposure, etc. Additionally, these methods often overlook the specificity of foreground objects, weakening the salience of the objects of interest within the fused images. To address these challenges, this study proposes a novel interactive multi-modal image fusion framework based on the text-modulated diffusion model, called Text-DiFuse. First, this framework integrates feature-level information integration into the diffusion process, allowing adaptive degradation removal and multi-modal information fusion. This is the first attempt to deeply and explicitly embed information fusion within the diffusion process, effectively addressing compound degradation in image fusion. Second, by embedding the combination of the text and zero-shot location model into the diffusion fusion process, a text-controlled fusion re-modulation strategy is developed. This enables usercustomized text control to improve fusion performance and highlight foreground objects in the fused images. Extensive experiments on diverse public datasets show that our Text-DiFuse achieves state-of-the-art fusion performance across various scenarios with complex degradation. Moreover, the semantic segmentation experiment validates the significant enhancement in semantic performance achieved by our text-controlled fusion re-modulation strategy. The code is publicly available at https://github.com/Leiii-Cao/Text-DiFuse.

For agents

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

get_harvested_code_for_paper("2410.23905")
get_code_for_paper("2410.23905")
have("2410.23905")

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

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

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

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

Connect an agent — have() is free.