SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.08248 · 2024

TextBoost: Boosting Text Encoder for Personalized Text-to-Image Generation

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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, 2 violated it and 0 have no contract verdict; 9 failures of our instrument; 3 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/2409.08248.json · badge: /api/ran/2409.08248.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
nahyeonkaty/textboost canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
FunctionStatusWhere it lives
add_new_token Ran
ran; our contract draft was wrong, not the code
nahyeonkaty/textboost/src/textboost/ti_utils.py
code served (permissive licence) · get_code("880d2ac0a7cd3e47")
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 NewToken. 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
from dataclasses import dataclass

torch.manual_seed(0)

# Stand-in tokenizer class
class SimpleTokenizer:
    def __init__(self):
        self.vocab = {
            'the': 0, 'quick': 1, 'brown': 2, 'fox': 3, 
            'jumps': 4, 'over': 5, 'lazy': 6, 'dog': 7
        }
        self.id_to_token = {v: k for k, v in self.vocab.items()}
        self.next_id = len(self.vocab)
    
    def encode(self, text, add_special_tokens=False):
        tokens = text.split()
        return [self.vocab.get(token, self.next_id - 1) for token in tokens]
    
    def add_tokens(self, tokens):
        count = 0
        for token in tokens:
            if token not in self.vocab:
                self.vocab[token] = self.next_id
                self.id_to_token[self.next_id] = token
                self.next_id += 1
                count += 1
        return count
    
    def convert_tokens_to_ids(self, tokens):
        return [self.vocab[token] for token in tokens]
    
    def __len__(self):
        return self.next_id


# Stand-in text encoder class
class SimpleTextEncoder(nn.Module):
    def __init__(self, vocab_size=8, embedding_dim=4):
        super().__init__()
        self.embeddings = nn.Embedding(vocab_size, embedding_dim)
    
    def resize_token_embeddings(self, new_size):
        old_size = self.embeddings.num_embeddings
        if new_size > old_size:
            new_embeddings = nn.Embedding(new_size, self.embeddings.embedding_dim)
            new_embeddings.weight.data[:old_size] = self.embeddings.weight.data
            self.embeddings = new_embeddings
    
    def get_input_embeddings(self):
        return self.embeddings


# Create tokenizer and encoder
tokenizer = SimpleTokenizer()
text_encoder = SimpleTextEncoder(vocab_size=len(tokenizer), embedding_dim=4)

# Define ARGS
ARGS = {
    'tokenizer': tokenizer,
    'text_encoder': text_encoder,
    'placeholder': '<new_token>',
    'init_token': 'quick brown',
    'pad_style': 'tb',
    'joiner': ' '
}
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 NewToken — a NewToken output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NewToken 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
forced_weight_norm Ran
ran; our contract draft was wrong, not the code
nahyeonkaty/textboost/src/textboost/ti_utils.py
code served (permissive licence) · get_code("5c98bd294f643a86")
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 (3, 1) 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 a minimal text encoder with get_input_embeddings() method
class MinimalTextEncoder(nn.Module):
    def __init__(self, vocab_size=10, embedding_dim=4):
        super().__init__()
        self.embeddings = nn.Embedding(vocab_size, embedding_dim)
    
    def get_input_embeddings(self):
        return self.embeddings

# Instantiate the text encoder
text_encoder = MinimalTextEncoder(vocab_size=10, embedding_dim=4)

# Define arguments for forced_weight_norm
ARGS = {
    "text_encoder": text_encoder,
    "index": [0, 2, 5],  # list of indices
    "magnitude": 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 2, dtype family float, shape (3, 1) — shape (3, 1) 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
generator_build Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
nahyeonkaty/textboost/src/textboost/generator_builder.py
code served (permissive licence) · get_code("612bf864a644221b")
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
from peft import LoraConfig
from collections.abc import Sequence

torch.manual_seed(0)

# Build a minimal generator module that has the structure expected by the function
class MinimalAttention(nn.Module):
    def __init__(self, use_attn2=False):
        super().__init__()
        self.use_attn2 = use_attn2
        if use_attn2:
            # For attn2 case (cross-attention)
            self.attn2 = nn.Module()
            self.attn2.to_k = nn.Linear(4, 4)
            self.attn2.to_v = nn.Linear(4, 4)
        else:
            # For standard self-attention
            self.to_q = nn.Linear(4, 4)
            self.to_k = nn.Linear(4, 4)
            self.to_v = nn.Linear(4, 4)
            self.to_out = nn.Sequential(nn.Linear(4, 4))

class MinimalGenerator(nn.Module):
    def __init__(self, use_attn2=False):
        super().__init__()
        self.attention = MinimalAttention(use_attn2=use_attn2)
    
    def forward(self, x):
        return x

# Create a generator instance for testing
generator = MinimalGenerator(use_attn2=False)

# Create a generator with add_adapter support (for LoRA testing)
class LoRACapableGenerator(nn.Module):
    def __init__(self):
        super().__init__()
        self.attention = MinimalAttention(use_attn2=False)
        self._peft_config = {}
    
    def add_adapter(self, config):
        # Minimal mock implementation of add_adapter
        self._peft_config['default'] = config
        # Mark LoRA parameters as trainable
        for name, module in self.named_modules():
            if any(target in name for target in config.target_modules):
                if hasattr(module, 'weight'):
                    # Create a mock LoRA parameter
                    lora_weight = nn.Parameter(torch.randn(4, 4))
                    setattr(module, 'lora_weight', lora_weight)
    
    def forward(self, x):
        return x

generator_lora = LoRACapableGenerator()

# Define the ARGS dictionary with all parameters
ARGS = {
    'generator': generator,
    'mode': 'none',
    'lora_rank': 0,
    'lora_target_modules': None,
    'kv_patterns': None,
    'lora_alpha': None,
    'init_lora_weights': 'gaussian',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
peft, 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
get_images_path Ran
ran; our contract draft was wrong, not the code
nahyeonkaty/textboost/src/textboost/datasets.py
code served (permissive licence) · get_code("49ba8cbb960e2237")
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.

from pathlib import Path
import tempfile
import os

# Create a temporary directory with some test files
temp_dir = tempfile.mkdtemp()

# Create some test image files
test_image_files = ['test1.jpg', 'test2.png', 'test3.gif']
for filename in test_image_files:
    filepath = os.path.join(temp_dir, filename)
    # Create empty files with image extensions
    Path(filepath).touch()

# Also create a non-image file to test filtering
Path(os.path.join(temp_dir, 'test.txt')).touch()

ARGS = {
    'data_root': temp_dir,
    'max_samples': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — 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
get_prompts Ran
ran; our contract draft was wrong, not the code
nahyeonkaty/textboost/src/textboost/evaluation/core.py
code served (permissive licence) · get_code("f2e38d770c4f705f")
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 os
import tempfile
from typing import List, Optional

# Create a temporary prompts file for testing
temp_dir = tempfile.mkdtemp()
prompts_file = os.path.join(temp_dir, "test_prompts.txt")
with open(prompts_file, 'w', encoding='utf-8') as f:
    f.write("a cat in the forest\n")
    f.write("a dog on the beach\n")
    f.write("a bird in the sky\n")

# Define test prompts list
test_prompts_list = [
    "a {} in the desert",
    "a {} in the mountains",
    "a {} in the ocean"
]

# Construct ARGS dict with all parameters for get_prompts
ARGS = {
    'prompts_file': None,
    'prompts_list': None,
    'use_defaults': True
}
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
is_image_file Ran
ran, violated the contract we drafted
nahyeonkaty/textboost/src/textboost/datasets.py
code served (permissive licence) · get_code("72fcd818096aee74")
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.

from pathlib import Path

ARGS = {
    "file_path": "test_image.png"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — 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
is_live Ran
ran, violated the contract we drafted
nahyeonkaty/textboost/src/textboost/evaluation/dreambooth.py
code served (permissive licence) · get_code("294cbd4a861df6d7")
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 numpy as np

INSTANCES = {'backpack': 'backpack', 'backpack_dog': 'backpack', 'bear_plushie': 'stuffed animal', 'berry_bowl': 'bowl', 'can': 'can', 'candle': 'candle', 'cat': 'cat', 'cat2': 'cat', 'clock': 'clock', 'colorful_sneaker': 'sneaker', 'dog': 'dog', 'dog2': 'dog', 'dog3': 'dog', 'dog5': 'dog', 'dog6': 'dog', 'dog7': 'dog', 'dog8': 'dog', 'duck_toy': 'toy', 'fancy_boot': 'boot', 'grey_sloth_plushie': 'stuffed animal', 'monster_toy': 'toy', 'pink_sunglasses': 'glasses', 'poop_emoji': 'toy', 'rc_car': 'toy', 'red_cartoon': 'cartoon', 'robot_toy': 'toy', 'shiny_sneaker': 'sneaker', 'teapot': 'teapot', 'vase': 'vase', 'wolf_plushie': 'stuffed animal'}

def is_live(instance):
    cls = INSTANCES[instance]
    return cls in ('dog', 'cat')

ARGS = {
    'instance': 'dog'
}
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 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
load_new_token Ran
ran; our contract draft was wrong, not the code
nahyeonkaty/textboost/src/textboost/ti_utils.py
code served (permissive licence) · get_code("95f9712e08dc49d3")
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 str. 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 minimal tokenizer stand-in
class MinimalTokenizer:
    def __init__(self):
        self.vocab_size = 100
        self.tokens = {}
        self.id_counter = self.vocab_size
    
    def add_tokens(self, new_tokens):
        for token in new_tokens:
            if token not in self.tokens:
                self.tokens[token] = self.id_counter
                self.id_counter += 1
    
    def convert_tokens_to_ids(self, tokens):
        return [self.tokens[token] for token in tokens]
    
    def __len__(self):
        return self.vocab_size + len(self.tokens)

# Create a minimal text encoder
class MinimalTextEncoder(nn.Module):
    def __init__(self, vocab_size=100, embedding_dim=4):
        super().__init__()
        self.embeddings = nn.Embedding(vocab_size, embedding_dim)
    
    def get_input_embeddings(self):
        return self.embeddings
    
    def resize_token_embeddings(self, new_size):
        old_embeddings = self.embeddings
        self.embeddings = nn.Embedding(new_size, old_embeddings.embedding_dim)
        self.embeddings.weight.data[:old_embeddings.num_embeddings] = old_embeddings.weight.data

text_encoder = MinimalTextEncoder(vocab_size=100, embedding_dim=4)
tokenizer = MinimalTokenizer()
placeholder = "<my_token>"
learned_embedding = torch.randn(2, 4)  # 2 vectors of dimension 4
joiner = ' '

ARGS = {
    'text_encoder': text_encoder,
    'tokenizer': tokenizer,
    'placeholder': placeholder,
    'learned_embedding': learned_embedding,
    'joiner': joiner,
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
load_prompts_from_file Ran
ran; our contract draft was wrong, not the code
nahyeonkaty/textboost/src/textboost/evaluation/core.py
code served (permissive licence) · get_code("8802c8bb9eabf0f5")
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 os
import tempfile

# Create a temporary file with sample prompts
temp_dir = tempfile.mkdtemp()
prompts_file = os.path.join(temp_dir, "prompts.txt")

with open(prompts_file, 'w', encoding='utf-8') as f:
    f.write("What is machine learning?\n")
    f.write("Explain neural networks\n")
    f.write("Tell me about Python\n")

ARGS = {
    'prompts_file': prompts_file
}
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
make_expand_adapter_key Ran
ran; our contract draft was wrong, not the code
nahyeonkaty/textboost/src/textboost/expand_bank.py
code served (permissive licence) · get_code("bcd8d413e1a72650")
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 str. 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 make_expand_adapter_key takes a layer_name string and replaces
# dots with double underscores. It's a simple string transformation function.
# No complex objects needed - just a string parameter.

ARGS = {
    "layer_name": "transformer.layer.0.attention"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
tokenize_prompt Ran
ran; our contract draft was wrong, not the code
nahyeonkaty/textboost/src/textboost/datasets.py
code served (permissive licence) · get_code("424823a175dc433e")
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

torch.manual_seed(0)

class MockTokenizer:
    def __init__(self):
        self.model_max_length = 77
    
    def __call__(self, prompt, truncation=False, padding=None, max_length=None, return_tensors=None):
        # Simulate tokenizer output
        # Returns a dict with 'input_ids' and 'attention_mask' as tensors
        batch_size = 1
        seq_len = max_length if max_length else 10
        input_ids = torch.randint(0, 1000, (batch_size, seq_len))
        attention_mask = torch.ones((batch_size, seq_len))
        return {
            'input_ids': input_ids,
            'attention_mask': attention_mask
        }

tokenizer = MockTokenizer()
prompt = "A beautiful landscape with mountains and rivers"
tokenizer_max_length = None

ARGS = {
    'tokenizer': tokenizer,
    'prompt': prompt,
    'tokenizer_max_length': tokenizer_max_length
}
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
attach_adapters_to_model Not yet run
unverified (harvested, no recorded run)
nahyeonkaty/textboost/src/textboost/adapters.py
code served (permissive licence) · get_code("fec6bb93784f10f0")
How it ran

no invocation recorded.

custom_lora_forward Not yet run
unverified (harvested, no recorded run)
nahyeonkaty/textboost/src/textboost/attention_processor.py
code served (permissive licence) · get_code("5fa7f7068bb368b3")
How it ran

no invocation recorded.

discover_instances Not yet run
unverified (harvested, no recorded run)
nahyeonkaty/textboost/src/textboost/evaluation/core.py
code served (permissive licence) · get_code("809de9bd5d464d12")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 14 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.

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

In this paper, we introduce TextBoost, an efficient one-shot personalization approach for text-to-image diffusion models. Traditional personalization methods typically involve fine-tuning extensive portions of the model, leading to substantial storage requirements and slow convergence. In contrast, we propose selectively fine-tuning only the text encoder, significantly improving computational and storage efficiency. To preserve the original semantic integrity, we develop a novel causality-preserving adaptation mechanism. Additionally, lightweight adapters are employed to locally refine text embeddings immediately before their interaction with cross-attention layers, greatly enhancing the expressiveness of text embeddings with minimal computational overhead. Empirical evaluations across diverse concepts demonstrate that TextBoost achieves faster convergence and substantially reduces storage demands by minimizing the number of trainable parameters. Furthermore, TextBoost maintains comparable subject fidelity, superior text fidelity, and greater generation diversity compared to existing methods. We show that our proposed method offers an efficient, scalable, and practically applicable solution for high-quality text-to-image personalization, particularly beneficial in resource-constrained environments.

For agents

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

get_harvested_code_for_paper("2409.08248")
get_code_for_paper("2409.08248")
have("2409.08248")

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

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

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

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

Connect an agent — have() is free.