SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.02126 · 2024

Unified Diffusion-Based Rigid and Non-Rigid Editing with Text and Image Guidance

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 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/2401.02126.json · badge: /api/ran/2401.02126.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
kihensarn/ti-guided-edit canonical (classifier label)
classifier basis not recorded on the link
3 ran · 2 no recorded run
FunctionStatusWhere it lives
calc_mean_std Ran
ran; our contract draft was wrong, not the code
kihensarn/ti-guided-edit/utils/adain.py
code served (permissive licence) · get_code("7ee9dfbb0bd00480")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Test case 1: 3D tensor without mask
feat_3d = torch.randn(4, 3, 5)  # C=4, H=3, W=5

# Test case 2: 3D tensor with mask
mask_3d = torch.ones(3, 5)
mask_3d[0, 0] = 0  # Mark one position as masked out

# Test case 3: 2D tensor without mask
feat_2d = torch.randn(4, 15)  # C=4, flattened spatial

# Test case 4: 2D tensor with mask
mask_2d = torch.ones(15)
mask_2d[0] = 0

# Use the 3D case as primary test
ARGS = {
    "feat": feat_3d,
    "eps": 1e-05,
    "mask": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calc_mean_std_2d Ran
ran; our contract draft was wrong, not the code
kihensarn/ti-guided-edit/utils/adain.py
code served (permissive licence) · get_code("dcbb6d9b7d233a4e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 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 torch

torch.manual_seed(0)

# Create a 2D feature tensor with shape (C, N) where C=4 channels, N=6 elements
feat = torch.randn(4, 6)

# Create a mask tensor with shape (6,) where 1 indicates valid elements
mask = torch.tensor([1, 1, 1, 0, 1, 1])

ARGS = {
    "feat": feat,
    "eps": 1e-05,
    "mask": 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 tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
masked_adain Ran
ran; our contract draft was wrong, not the code
kihensarn/ti-guided-edit/utils/adain.py
code served (permissive licence) · get_code("cb4f657896b3cfe3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (4, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create feature tensors
# The function expects style_feat and content_feat to have matching first 2 dimensions
# They can be either 2D (C, N) or 3D (C, H, W)
# Let's create 3D tensors: (channels, height, width)

C = 4  # channels
H = 3  # height
W = 5  # width

style_feat = torch.randn(C, H, W)
content_feat = torch.randn(C, H, W)

# Create masks - binary masks same spatial dims as features
# mask values should be 0 or 1
style_mask = torch.randint(0, 2, (H, W)).float()
content_mask = torch.randint(0, 2, (H, W)).float()

ARGS = {
    "style_feat": style_feat,
    "content_feat": content_feat,
    "style_mask": style_mask,
    "content_mask": content_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 (4, 3, 5) — shape (4, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
register_conv_control_efficient Not yet run
unverified (harvested, no recorded run)
kihensarn/ti-guided-edit/utils/masactrl_utils.py
code served (permissive licence) · get_code("e97c3effd6355f80")
How it ran

no invocation recorded.

regiter_attention_editor_diffusers Not yet run
unverified (harvested, no recorded run)
kihensarn/ti-guided-edit/utils/masactrl_utils.py
code served (permissive licence) · get_code("827413ab1b8cdef0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 5 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 5 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
calc_mean_std 2 other papers
2 later
2407.17850 (2024-07)
FlexiEdit: Frequency-Aware Latent Refinement for Enhanced Non-Rigid Editing
2602.03625 (2026-02)
Multi-Objective Optimization for Synthetic-to-Real Style Transfer
calc_mean_std_2d 2 other papers
2 later
2407.17850 (2024-07)
FlexiEdit: Frequency-Aware Latent Refinement for Enhanced Non-Rigid Editing
2602.03625 (2026-02)
Multi-Objective Optimization for Synthetic-to-Real Style Transfer
masked_adain 1 other paper
1 later
2407.17850 (2024-07)
FlexiEdit: Frequency-Aware Latent Refinement for Enhanced Non-Rigid Editing
register_conv_control_efficient 1 other paper
1 later
2407.17850 (2024-07)
FlexiEdit: Frequency-Aware Latent Refinement for Enhanced Non-Rigid Editing
regiter_attention_editor_diffusers 1 other paper
1 later
2407.17850 (2024-07)
FlexiEdit: Frequency-Aware Latent Refinement for Enhanced Non-Rigid Editing

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 text-to-image editing methods tend to excel either in rigid or non-rigid editing but encounter challenges when combining both, resulting in misaligned outputs with the provided text prompts. In addition, integrating reference images for control remains challenging. To address these issues, we present a versatile image editing framework capable of executing both rigid and non-rigid edits, guided by either textual prompts or reference images. We leverage a dual-path injection scheme to handle diverse editing scenarios and introduce an integrated self-attention mechanism for fusion of appearance and structural information. To mitigate potential visual artifacts, we further employ latent fusion techniques to adjust intermediate latents. Compared to previous work, our approach represents a significant advance in achieving precise and versatile image editing. Comprehensive experiments validate the efficacy of our method, showcasing competitive or superior results in text-based editing and appearance transfer tasks, encompassing both rigid and non-rigid settings.

For agents

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

get_harvested_code_for_paper("2401.02126")
get_code_for_paper("2401.02126")
have("2401.02126")

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

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

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

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

Connect an agent — have() is free.