SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.07517 · 2024

FireFlow: Fast Inversion of Rectified Flow for Image Semantic Editing

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 4 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/2412.07517.json · badge: /api/ran/2412.07517.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
holmesshuan/fireflow canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
FunctionStatusWhere it lives
calculate_mse Ran
ran, violated the contract we drafted
holmesshuan/fireflow/src/calculate_reconstruction_error.py
code served (permissive licence) · get_code("e6761d87b84f732c")
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 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 numpy as np
import math

# The function calculate_mse takes two images and computes MSE between them
# It converts inputs to numpy arrays, computes squared differences, takes mean, and returns sqrt

# Create two small image arrays (different sizes to be distinct)
image1 = np.random.rand(4, 3).astype(np.float32)
image2 = np.random.rand(4, 3).astype(np.float32)

ARGS = {
    "image1": image1,
    "image2": image2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
extract_steps_from_filename Ran
ran, honoured the contract we drafted
holmesshuan/fireflow/src/calculate_reconstruction_error.py
code served (permissive licence) · get_code("dcadced4a54cb3e8")
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 int, ndim 0, dtype family int, 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 re

def extract_steps_from_filename(filename):
    """
    Extract steps (X) from filename pattern 'steps_X'.
    """
    match = re.search('steps_(\\d+)', filename)
    return int(match.group(1)) if match else None

ARGS = {
    'filename': 'model_steps_42_checkpoint.pt'
}
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 int, ndim 0, dtype family int, 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
get_lin_function Ran
ran; our contract draft was wrong, not the code
holmesshuan/fireflow/src/flux/sampling.py
code served (permissive licence) · get_code("3f6652da855a2ea0")
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 function. 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

torch.manual_seed(0)

ARGS = {
    "x1": 256.0,
    "y1": 0.5,
    "x2": 4096.0,
    "y2": 1.15,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
rope Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
holmesshuan/fireflow/src/flux/math.py
code served (permissive licence) · get_code("17724d4203fa5863")
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 5, dtype family float, shape (2, 3, 2, 2, 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
from einops import rearrange

torch.manual_seed(0)

# Create arguments for the rope function
pos = torch.arange(0, 6, dtype=torch.float64).reshape(2, 3)  # shape (2, 3)
dim = 4
theta = 10000

ARGS = {
    "pos": pos,
    "dim": dim,
    "theta": theta
}
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 Tensor, ndim 5, dtype family float, shape (2, 3, 2, 2, 2) — shape (2, 3, 2, 2, 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
swish Ran
ran; our contract draft was wrong, not the code
holmesshuan/fireflow/src/flux/modules/autoencoder.py
code served (permissive licence) · get_code("5fb036462ae82f9f")
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 torch
from torch import Tensor

torch.manual_seed(0)

# The swish function takes a single Tensor argument and applies:
# x * torch.sigmoid(x)
# We need to provide a small tensor as input

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
time_shift Ran
ran; our contract draft was wrong, not the code
holmesshuan/fireflow/src/flux/sampling.py
code served (permissive licence) · get_code("9f391f7c45a5bc94")
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
from torch import Tensor

torch.manual_seed(0)

# Analyze the function:
# - mu: float, used in math.exp(mu)
# - sigma: float, used as exponent in (1 / t - 1) ** sigma
# - t: Tensor, used in arithmetic operations (1 / t - 1)

# Create a small tensor for t
# t is used in: 1 / t - 1
# So t should be a tensor with values that make sense (not zero, positive values work well)
t = torch.tensor([[0.5, 0.8, 0.3, 0.9],
                   [0.6, 0.7, 0.4, 0.2]], dtype=torch.float32)

ARGS = {
    "mu": 0.5,
    "sigma": 2.0,
    "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 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
timestep_embedding Ran
ran; our contract draft was wrong, not the code
holmesshuan/fireflow/src/flux/modules/layers.py
code served (permissive licence) · get_code("0a1aadb08bf169c1")
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 valid arguments for the timestep_embedding function
t = torch.tensor([0.0, 1.0], dtype=torch.float32)  # batch size 2
dim = 4
max_period = 10000
time_factor = 1000.0

ARGS = {
    "t": t,
    "dim": dim,
    "max_period": max_period,
    "time_factor": time_factor,
}
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
apply_rope Not yet run
unverified (harvested, no recorded run)
holmesshuan/fireflow/src/flux/math.py
code served (permissive licence) · get_code("3444bbcc9065f707")
How it ran

no invocation recorded.

attention Not yet run
unverified (harvested, no recorded run)
holmesshuan/fireflow/src/flux/math.py
code served (permissive licence) · get_code("b17d74354ecaf7fe")
How it ran

no invocation recorded.

encode Not yet run
unverified (harvested, no recorded run)
holmesshuan/fireflow/src/edit.py
code served (permissive licence) · get_code("1498dfc442c71ecc")
How it ran

no invocation recorded.

encode Not yet run
unverified (harvested, no recorded run)
holmesshuan/fireflow/src/gradio_demo.py
code served (permissive licence) · get_code("e02de920391fa756")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 9 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 7 later) and 2 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
apply_rope 9 other papers
2 dated earlier, 7 later · 3 only as an assembly brick
2409.00587 (2024-09)
FLUX that Plays Music
2411.04746 (2024-11)
Taming Rectified Flow for Inversion and Editing
2502.01105 (2025-02)
LayerTracer: Cognitive-Aligned Layered SVG Synthesis via Diffusion Transformer
and 6 more not named here
rope 8 other papers
2 dated earlier, 6 later · 2 only as an assembly brick
2409.00587 (2024-09)
FLUX that Plays Music
2411.04746 (2024-11)
Taming Rectified Flow for Inversion and Editing
2502.01105 (2025-02)
LayerTracer: Cognitive-Aligned Layered SVG Synthesis via Diffusion Transformer
and 5 more not named here
swish 7 other papers
1 dated earlier, 6 later
2409.00587 (2024-09)
FLUX that Plays Music
2504.02160 (2025-04)
Less-to-More Generalization: Unlocking More Controllability by In-Context Generation
2508.05606 (2025-08)
Uni-cot: Towards Unified Chain-of-Thought Reasoning Across Text and Vision
and 4 more not named here
attention 6 other papers
2 dated earlier, 4 later · 1 only as an assembly brick
2409.00587 (2024-09)
FLUX that Plays Music
2411.04746 (2024-11)
Taming Rectified Flow for Inversion and Editing
2504.02160 (2025-04)
Less-to-More Generalization: Unlocking More Controllability by In-Context Generation
and 3 more not named here
timestep_embedding 5 other papers
5 later · 1 only as an assembly brick
2502.01105 (2025-02)
LayerTracer: Cognitive-Aligned Layered SVG Synthesis via Diffusion Transformer
2502.17363 (2025-02)
KV-Edit: Training-Free Image Editing for Precise Background Preservation
2504.02160 (2025-04)
Less-to-More Generalization: Unlocking More Controllability by In-Context Generation
and 2 more not named here
get_lin_function 4 other papers
1 dated earlier, 3 later
2411.04746 (2024-11)
Taming Rectified Flow for Inversion and Editing
2502.17363 (2025-02)
KV-Edit: Training-Free Image Editing for Precise Background Preservation
2504.17761 (2025-04)
Step1X-Edit: A Practical Framework for General Image Editing
and 1 more not named here
time_shift 3 other papers
1 dated earlier, 2 later
2411.04746 (2024-11)
Taming Rectified Flow for Inversion and Editing
2502.17363 (2025-02)
KV-Edit: Training-Free Image Editing for Precise Background Preservation
2504.02160 (2025-04)
Less-to-More Generalization: Unlocking More Controllability by In-Context Generation
encode 2 other papers
2 dated earlier
2406.03293 (2024-06)
Text-to-Image Rectified Flow as Plug-and-Play Priors
2411.04746 (2024-11)
Taming Rectified Flow for Inversion and Editing
encode 1 other paper
1 dated earlier
2411.04746 (2024-11)
Taming Rectified Flow for Inversion and 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

Though Rectified Flows (ReFlows) with distillation offers a promising way for fast sampling, its fast inversion transforms images back to structured noise for recovery and following editing remains unsolved. This paper introduces FireFlow, a simple yet effective zero-shot approach that inherits the startling capacity of ReFlow-based models (such as FLUX) in generation while extending its capabilities to accurate inversion and editing in $8$ steps. We first demonstrate that a carefully designed numerical solver is pivotal for ReFlow inversion, enabling accurate inversion and reconstruction with the precision of a second-order solver while maintaining the practical efficiency of a first-order Euler method. This solver achieves a $3\times$ runtime speedup compared to state-of-the-art ReFlow inversion and editing techniques, while delivering smaller reconstruction errors and superior editing results in a training-free mode. The code is available at $\href{https://github.com/HolmesShuan/FireFlow}{this URL}$.

For agents

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

get_harvested_code_for_paper("2412.07517")
get_code_for_paper("2412.07517")
have("2412.07517")

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

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

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

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

Connect an agent — have() is free.