SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.08629 · 2024

FlowEdit: Inversion-Free Text-Based Editing Using Pre-Trained Flow Models

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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 0 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2412.08629.json · badge: /api/ran/2412.08629.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
fallenshock/FlowEdit canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
calc_v_sd3 Ran
ran; our contract draft was wrong, not the code
fallenshock/FlowEdit/FlowEdit_utils.py
code served (permissive licence) · get_code("dbafd2bdb024a4f1")
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)

class MockTransformer(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, hidden_states, timestep, encoder_hidden_states, pooled_projections, joint_attention_kwargs, return_dict=False):
        # Output shape: (batch_size, seq_len, channels)
        # We need to output 8 chunks worth of data for classifier-free guidance
        batch_size = hidden_states.shape[0]
        seq_len = hidden_states.shape[1]
        channels = hidden_states.shape[2]
        # Return 4x the batch size to allow chunking into 4 parts
        output = torch.randn(batch_size * 4, seq_len, channels)
        if return_dict:
            return {"sample": output}
        else:
            return (output,)

class MockPipe:
    def __init__(self):
        self.transformer = MockTransformer()
        self.do_classifier_free_guidance = True

# Create mock pipe
pipe = MockPipe()

# Batch size: 2, seq_len: 3, latent_channels: 4
# For classifier-free guidance with 4 chunks, we need batch_size * 4
batch_size = 2
seq_len = 3
latent_channels = 4
prompt_embed_dim = 5

src_tar_latent_model_input = torch.randn(batch_size * 4, seq_len, latent_channels)
src_tar_prompt_embeds = torch.randn(batch_size * 4, seq_len, prompt_embed_dim)
src_tar_pooled_prompt_embeds = torch.randn(batch_size * 4, prompt_embed_dim)
src_guidance_scale = 7.5
tar_guidance_scale = 7.5
t = torch.tensor(500)

ARGS = {
    "pipe": pipe,
    "src_tar_latent_model_input": src_tar_latent_model_input,
    "src_tar_prompt_embeds": src_tar_prompt_embeds,
    "src_tar_pooled_prompt_embeds": src_tar_pooled_prompt_embeds,
    "src_guidance_scale": src_guidance_scale,
    "tar_guidance_scale": tar_guidance_scale,
    "t": t,
}
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
calculate_shift Ran
ran, violated the contract we drafted
fallenshock/FlowEdit/FlowEdit_utils.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
scale_noise Ran
ran; our contract draft was wrong, not the code
fallenshock/FlowEdit/FlowEdit_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from Tankowa/SNR-Edit, is pointer only (licence: NONE) · get_code("35c7e38b2cdd2b6c")
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 Tankowa/SNR-Edit, 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.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 2 later) and 1 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
calculate_shift 15 other papers
4 dated earlier, 1 the same month, 10 later
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
scale_noise 2 other papers
2 later
2510.25970 (2025-10)
SplitFlow: Flow Decomposition for Inversion-Free Text-to-Image Editing
2601.19180 (2026-01)
SNR-Edit: Structure-Aware Noise Rectification for Inversion-Free Flow-Based 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-23.

Repositories linked to this paper

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

Abstract

Editing real images using a pre-trained text-to-image (T2I) diffusion/flow model often involves inverting the image into its corresponding noise map. However, inversion by itself is typically insufficient for obtaining satisfactory results, and therefore many methods additionally intervene in the sampling process. Such methods achieve improved results but are not seamlessly transferable between model architectures. Here, we introduce FlowEdit, a text-based editing method for pre-trained T2I flow models, which is inversion-free, optimization-free and model agnostic. Our method constructs an ODE that directly maps between the source and target distributions (corresponding to the source and target text prompts) and achieves a lower transport cost than the inversion approach. This leads to state-of-the-art results, as we illustrate with Stable Diffusion 3 and FLUX. Code and examples are available on the project's webpage.

For agents

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

get_harvested_code_for_paper("2412.08629")
get_code_for_paper("2412.08629")
have("2412.08629")

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

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

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

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

Connect an agent — have() is free.