SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.20413 · 2024

EraseAnything: Enabling Concept Erasure in Rectified Flow Transformers

arXiv · PDF · Open in the Atlas

Code that ran

11 of 16 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 10 have no contract verdict; 1 failure of our instrument; 5 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.20413.json · badge: /api/ran/2412.20413.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
tomguluson92/eraseanything canonical (classifier label)
classifier basis not recorded on the link
11 ran · 5 no recorded run
FunctionStatusWhere it lives
MoE Ran
ran on a synthesized input
tomguluson92/eraseanything/ir_concept.py
code served (permissive licence) · get_code("2f410d45aa8c1315")
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 list, ndim 1, 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 random

class MockModelCaller:
    def get_response(self, model_name: str, messages: list) -> str:
        # Return a mock JSON response that matches the expected format
        return """{
            "No_relation": [("xyz", 0.1), ("abc", 0.15), ("def", 0.12)],
            "far": [("distant", 0.2), ("remote", 0.25), ("separated", 0.22)],
            "mid": [("moderate", 0.5), ("medium", 0.55), ("average", 0.52)],
            "close": [("similar", 0.9), ("alike", 0.95), ("near", 0.92)]
        }"""

# Create mock model caller
model_caller = MockModelCaller()

# Define arguments for the MoE function
ARGS = {
    'model_caller': model_caller,
    'word': 'cat',
    'K': 3,
    'model_list': ['gpt', 'claude', 'kimi', 'qwen'],
    'final_expert': ['gpt']
}
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 list, ndim 1, dtype family float — a list 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_steer_loss Ran
ran on a synthesized input
tomguluson92/eraseanything/utils/infoNCE.py
code served (permissive licence) · get_code("2ff43c37cdeed4e6")
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 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.functional as F

torch.manual_seed(0)

# Create small attention tensors
# unlearn_attn: (batch, seq, dim) - attention map for unlearning
batch_size = 2
seq_len = 3
dim = 4

unlearn_attn = torch.randn(batch_size, seq_len, dim)

# neg_attn: (batch, seq, dim) - negative attention map
neg_attn = torch.randn(batch_size, seq_len, dim)

# irr_attn_lst: list of (batch, seq, dim) tensors - irrelevant attention maps
irr_attn_lst = [
    torch.randn(batch_size, seq_len, dim),
    torch.randn(batch_size, seq_len, dim)
]

# temperature: float - scaling parameter
temperature = 0.07

# method: str - aggregation method
method = 'mean'

ARGS = {
    'unlearn_attn': unlearn_attn,
    'neg_attn': neg_attn,
    'irr_attn_lst': irr_attn_lst,
    'temperature': temperature,
    'method': method
}
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 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
collate_data_fn Ran
ran on a synthesized input
tomguluson92/eraseanything/lora_dataset.py
code served (permissive licence) · get_code("cf4b316a3a6d6746")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Construct example data
example_1 = {
    'instance_images': torch.randn(3, 4, 4),  # 3 channels, 4x4 image
    'instance_prompt': 'a photo of a dog',
    'remove_indices': [0, 2],
    'synonym': 'canine',
    'class_images': torch.randn(3, 4, 4),
    'class_prompt': 'a photo of an animal'
}

example_2 = {
    'instance_images': torch.randn(3, 4, 4),
    'instance_prompt': 'a photo of a cat',
    'remove_indices': [1],
    'synonym': 'feline',
    'class_images': torch.randn(3, 4, 4),
    'class_prompt': 'a photo of a pet'
}

examples = [example_1, example_2]

ARGS = {
    'examples': examples,
    'with_prior_preservation': False
}
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 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
encode_prompt Ran
ran on a synthesized input
tomguluson92/eraseanything/prompt_process.py
code served (permissive licence) · get_code("39f2be6188e09424")
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 torch.nn as nn

torch.manual_seed(0)

# Minimal CLIP-like text encoder
class MockCLIPTextEncoder(nn.Module):
    def __init__(self, hidden_size=4):
        super().__init__()
        self.hidden_size = hidden_size
        self.embedding = nn.Embedding(1000, hidden_size)
        self.pooler = nn.Linear(hidden_size, hidden_size)
        self.dtype = torch.float32
        self.device_attr = torch.device('cpu')
    
    @property
    def device(self):
        return self.device_attr
    
    def forward(self, input_ids, output_hidden_states=False):
        embeds = self.embedding(input_ids)  # [batch, seq_len, hidden_size]
        pooled = self.pooler(embeds.mean(dim=1))  # [batch, hidden_size]
        
        class Output:
            def __init__(self, pooler_output):
                self.pooler_output = pooler_output
        
        return Output(pooler_output=pooled)

# Minimal T5-like text encoder
class MockT5TextEncoder(nn.Module):
    def __init__(self, hidden_size=6):
        super().__init__()
        self.hidden_size = hidden_size
        self.embedding = nn.Embedding(1000, hidden_size)
        self.dtype = torch.float32
        self.device_attr = torch.device('cpu')
    
    @property
    def device(self):
        return self.device_attr
    
    def forward(self, input_ids):
        embeds = self.embedding(input_ids)  # [batch, seq_len, hidden_size]
        return (embeds,)

# Minimal tokenizer
class MockTokenizer:
    def __init__(self, vocab_size=1000, max_len=77):
        self.vocab_size = vocab_size
        self.max_len = max_len
    
    def __call__(self, prompt, padding=None, max_length=None, truncation=None, 
                 return_length=None, return_overflowing_tokens=None, return_tensors=None):
        if isinstance(prompt, str):
            prompt = [prompt]
        
        batch_size = len(prompt)
        seq_len = max_length if max_length else self.max_len
        
        # Create dummy token ids
        input_ids = torch.randint(0, self.vocab_size, (batch_size, seq_len))
        
        class TokenizerOutput:
            def __init__(self, input_ids):
                self.input_ids = input_ids
        
        return TokenizerOutput(input_ids=input_ids)

# Build instances
text_encoder_clip = MockCLIPTextEncoder(hidden_size=4)
text_encoder_t5 = MockT5TextEncoder(hidden_size=6)
tokenizer_clip = MockTokenizer(max_len=77)
tokenizer_t5 = MockTokenizer(max_len=512)

device = torch.device('cpu')
prompt = "a beautiful image"
max_sequence_length = 512
num_images_per_prompt = 2

ARGS = {
    'text_encoders': [text_encoder_clip, text_encoder_t5],
    'tokenizers': [tokenizer_clip, tokenizer_t5],
    'prompt': prompt,
    'max_sequence_length': max_sequence_length,
    'device': device,
    'num_images_per_prompt': num_images_per_prompt,
    'text_input_ids_list': 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 — 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
filt_response Ran
ran on a synthesized input
tomguluson92/eraseanything/ir_concept.py
code served (permissive licence) · get_code("0393606cc9b74f59")
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 torch

def filt_response(response: str):
    response = response.split('{', 1)[1]
    response = response.rsplit('}')[0]
    response = eval('{' + response.replace('\n', '') + '}')
    return response

# Create a valid string that contains a dict-like structure
# The function expects a string with braces and dict content
test_response = """
Some prefix text {
    'key1': 'value1',
    'key2': 42,
    'key3': [1, 2, 3]
}
"""

ARGS = {
    'response': test_response
}
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 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
flux_pack_latents Ran
ran on a synthesized input
tomguluson92/eraseanything/utils/esd_utils.py
code served (permissive licence) · get_code("1f1b5d50699bbba0")
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, 12, 16) 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)

# Construct arguments for flux_pack_latents
# The function expects:
# - latents: a tensor that will be reshaped/permuted
# - batch_size: int
# - num_channels_latents: int
# - height: int
# - width: int

batch_size = 2
num_channels_latents = 4
height = 8
width = 6

# Create latents tensor with shape compatible with the reshaping operations
# After view: (batch_size, num_channels_latents, height // 2, 2, width // 2, 2)
# So we need: batch_size * num_channels_latents * (height // 2) * 2 * (width // 2) * 2
# = 2 * 4 * 4 * 2 * 3 * 2 = 384
latents = torch.randn(2, 4, 4, 2, 3, 2)

ARGS = {
    "latents": latents,
    "batch_size": batch_size,
    "num_channels_latents": num_channels_latents,
    "height": height,
    "width": width,
}
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, 12, 16) — shape (2, 12, 16) 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
import_model_class_from_model_name_or_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tomguluson92/eraseanything/train_flux_lora.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from DragonisCV/EyeControl, is pointer only (licence: NONE) · get_code("212f670149d23d38")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from DragonisCV/EyeControl, 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.

load_text_encoders Ran
ran on a synthesized input
tomguluson92/eraseanything/train_flux_lora.py
code served (permissive licence) · get_code("d38b6b75175267f1")
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 1, 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
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create mock text encoder classes
class MockTextEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    @classmethod
    def from_pretrained(cls, model_name, subfolder=None, revision=None, variant=None):
        """Mock from_pretrained method"""
        instance = cls()
        return instance

class_one = MockTextEncoder
class_two = MockTextEncoder

# Create args object with required attributes
class Args:
    def __init__(self):
        self.pretrained_model_name_or_path = "mock-model"
        self.revision = "main"
        self.variant = None

args = Args()

ARGS = {
    "class_one": class_one,
    "class_two": class_two,
    "args": args
}
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 1, 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
search_sequence_numpy Ran
ran on a synthesized input
tomguluson92/eraseanything/utils/find_token.py
code served (permissive licence) · get_code("c45ebec24dc3adce")
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 list, ndim 1, dtype family int; 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 numpy as np

# Create sample arrays for the function
# arr: 2D array where rows are searched
# seq: 2D array where non-zero elements indicate positions to search for

arr = np.array([
    [1, 2, 3, 4],
    [5, 6, 7, 8]
])

seq = np.array([
    [1, 0, 3, 0],
    [5, 0, 7, 0]
])

ARGS = {
    "arr": arr,
    "seq": seq
}
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 list, ndim 1, dtype family int — a list 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
tidy_output Ran
ran on a synthesized input
tomguluson92/eraseanything/ir_concept.py
code served (permissive licence) · get_code("2e5bb2364f868e35")
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 list, ndim 1, 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 random

random.seed(0)
torch.manual_seed(0)

# The function accesses final_output[0], which should be a dict
# with keys 'No_relation', 'far', 'mid'
# Each of these keys maps to a list where we index with idx (0, 1, or 2)
# and then access [0] on the result

# Construct the nested structure
final_output = [
    {
        'No_relation': [
            [torch.tensor(1.0)],
            [torch.tensor(2.0)],
            [torch.tensor(3.0)]
        ],
        'far': [
            [torch.tensor(4.0)],
            [torch.tensor(5.0)],
            [torch.tensor(6.0)]
        ],
        'mid': [
            [torch.tensor(7.0)],
            [torch.tensor(8.0)],
            [torch.tensor(9.0)]
        ]
    }
]

ARGS = {
    'final_output': final_output
}
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 list, ndim 1, dtype family float — a list 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
tokenize_prompt Ran
ran on a synthesized input
tomguluson92/eraseanything/prompt_process.py
code served (permissive licence) · get_code("442d96197841458f")
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 int, shape (1, 16) 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
from transformers import AutoTokenizer

torch.manual_seed(0)

# Create a minimal stand-in tokenizer class that mimics transformers tokenizer behavior
class MinimalTokenizer:
    def __call__(self, text, padding=None, max_length=None, truncation=None, 
                 return_length=None, return_overflowing_tokens=None, 
                 add_special_tokens=None, return_tensors=None):
        # Create dummy token ids - batch of 2, sequence length matching max_length
        batch_size = 1
        seq_len = max_length if max_length else 10
        
        # Simulate tokenizer output with input_ids tensor
        input_ids = torch.randint(0, 100, (batch_size, seq_len))
        
        # Return an object with input_ids attribute (mimics AutoTokenizer output)
        class TokenizerOutput:
            pass
        
        output = TokenizerOutput()
        output.input_ids = input_ids
        return output

# Create tokenizer instance
tokenizer = MinimalTokenizer()

# Create prompt text
prompt = "This is a test prompt for tokenization"

# Set max sequence length
max_sequence_length = 16

# Build ARGS dictionary with all required parameters
ARGS = {
    "tokenizer": tokenizer,
    "prompt": prompt,
    "max_sequence_length": max_sequence_length,
    "add_special_tokens": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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 int, shape (1, 16) — shape (1, 16) 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
flux_unpack_latents Not yet run
unverified (harvested, no recorded run)
tomguluson92/eraseanything/utils/esd_utils.py
code served (permissive licence) · get_code("d90a243dc7ac73ad")
How it ran

no invocation recorded.

get_sigmas Not yet run
unverified (harvested, no recorded run)
tomguluson92/eraseanything/utils/calc_loss.py
code served (permissive licence) · get_code("9ed681562f12226e")
How it ran

no invocation recorded.

get_synonyms Not yet run
unverified (harvested, no recorded run)
tomguluson92/eraseanything/lora_dataset.py
code served (permissive licence) · get_code("c1a4a7602c9e7e4d")
How it ran

no invocation recorded.

get_word_index Not yet run
unverified (harvested, no recorded run)
tomguluson92/eraseanything/utils/find_token.py
code served (permissive licence) · get_code("36355b45444139e9")
How it ran

no invocation recorded.

latent_sample Not yet run
unverified (harvested, no recorded run)
tomguluson92/eraseanything/utils/esd_utils.py
code served (permissive licence) · get_code("c140516be52da6c8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 1 the same month, 1 later) and 15 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
import_model_class_from_model_name_or_path 4 other papers
1 the same month, 3 later
2412.16112 (2024-12)
CLEAR: Conv-Like Linearization Revs Pre-Trained Diffusion Transformers Up
Huang_ArtEditor_Learning_Customized_Instructional_Image_Editor_from_Few-Shot_Examples_ICCV_2025_paper (2025 (year only))
ArtEditor: Learning Customized Instructional Image Editor from Few-Shot Examples
2507.05964 (2025-07)
T-LoRA: Single Image Diffusion Model Customization Without Overfitting
and 1 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-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

Removing unwanted concepts from large-scale text-to-image (T2I) diffusion models while maintaining their overall generative quality remains an open challenge. This difficulty is especially pronounced in emerging paradigms, such as Stable Diffusion (SD) v3 and Flux, which incorporate flow matching and transformer-based architectures. These advancements limit the transferability of existing concept-erasure techniques that were originally designed for the previous T2I paradigm (e.g., SD v1.4). In this work, we introduce EraseAnything, the first method specifically developed to address concept erasure within the latest flow-based T2I framework. We formulate concept erasure as a bi-level optimization problem, employing LoRA-based parameter tuning and an attention map regularizer to selectively suppress undesirable activations. Furthermore, we propose a self-contrastive learning strategy to ensure that removing unwanted concepts does not inadvertently harm performance on unrelated ones. Experimental results demonstrate that EraseAnything successfully fills the research gap left by earlier methods in this new T2I paradigm, achieving state-of-the-art performance across a wide range of concept erasure tasks.

For agents

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

get_harvested_code_for_paper("2412.20413")
get_code_for_paper("2412.20413")
have("2412.20413")

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

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

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

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

Connect an agent — have() is free.