SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.09522 · 2023

P+: Extended Textual Conditioning in Text-to-Image Generation

arXiv · PDF · Open in the Atlas

Code that ran

2 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, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 1 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/2303.09522.json · badge: /api/ran/2303.09522.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
mkshing/prompt-plus-pytorch community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
FunctionStatusWhere it lives
image_grid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mkshing/prompt-plus-pytorch/inference.py
code served (permissive licence) · get_code("bd5a05ce886da4ce")
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 Image. 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.

from PIL import Image

# Create small test images with distinct dimensions
img1 = Image.new('RGB', size=(64, 48), color=(255, 0, 0))
img2 = Image.new('RGB', size=(64, 48), color=(0, 255, 0))
img3 = Image.new('RGB', size=(64, 48), color=(0, 0, 255))
img4 = Image.new('RGB', size=(64, 48), color=(255, 255, 0))

ARGS = {
    'imgs': [img1, img2, img3, img4],
    'rows': 2,
    'cols': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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_embed_from_name_or_path Ran
ran on a synthesized input
mkshing/prompt-plus-pytorch/prompt_plus/prompt_plus_pipeline_stable_diffusion.py
code served (permissive licence) · get_code("0f0afef1576366fe")
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 os
import torch
import tempfile
from pathlib import Path

torch.manual_seed(0)

# Create temporary directories and files for testing
temp_dir_1 = tempfile.mkdtemp()
temp_dir_2 = tempfile.mkdtemp()

# Create learned_embeds.bin files
embed_1 = {
    "token_1": torch.randn(4),
    "token_2": torch.randn(4),
    "token_3": torch.randn(4),
}

embed_2 = {
    "token_1": torch.randn(4),
    "token_2": torch.randn(4),
    "token_3": torch.randn(4),
}

embeds_path_1 = os.path.join(temp_dir_1, 'learned_embeds.bin')
embeds_path_2 = os.path.join(temp_dir_2, 'learned_embeds.bin')

torch.save(embed_1, embeds_path_1)
torch.save(embed_2, embeds_path_2)

# Test case 1: Single learned embed (string path)
ARGS = {
    "learned_embed_name_or_path": embeds_path_1,
    "style_mixing_k_K": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
huggingface_hub, 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
get_full_repo_name Not yet run
unverified (harvested, no recorded run)
mkshing/prompt-plus-pytorch/train_p_plus.py
pointer only (licence: MIT); the stored copy get_code serves, from isno0907/isodiff, is pointer only (licence: NONE) · get_code("6431708d8f3ff177")
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 isno0907/isodiff, 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. No invocation 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 (2 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
get_full_repo_name 17 other papers
3 dated earlier, 1 the same month, 13 later
2210.09477 (2022-10)
UniTune: Text-Driven Image Editing by Fine Tuning a Diffusion Model on a Single Image
2211.15388 (2022-11)
Shifted Diffusion for Text-to-image Generation
2302.07944 (2023-02)
Effective Data Augmentation With Diffusion Models
and 14 more not named here
image_grid 17 other papers
1 dated earlier, 16 later
2201.08896 (2022-01)
Environment Generation for Zero-Shot Compositional Reinforcement Learning
2311.16518 (2023-11)
SeeSR: Towards Semantics-Aware Real-World Image Super-Resolution
2311.17042 (2023-11)
Adversarial Diffusion Distillation
and 14 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-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

We introduce an Extended Textual Conditioning space in text-to-image models, referred to as $P+$. This space consists of multiple textual conditions, derived from per-layer prompts, each corresponding to a layer of the denoising U-net of the diffusion model. We show that the extended space provides greater disentangling and control over image synthesis. We further introduce Extended Textual Inversion (XTI), where the images are inverted into $P+$, and represented by per-layer tokens. We show that XTI is more expressive and precise, and converges faster than the original Textual Inversion (TI) space. The extended inversion method does not involve any noticeable trade-off between reconstruction and editability and induces more regular inversions. We conduct a series of extensive experiments to analyze and understand the properties of the new space, and to showcase the effectiveness of our method for personalizing text-to-image models. Furthermore, we utilize the unique properties of this space to achieve previously unattainable results in object-style mixing using text-to-image models. Project page: https://prompt-plus.github.io

For agents

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

get_harvested_code_for_paper("2303.09522")
get_code_for_paper("2303.09522")
have("2303.09522")

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

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

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

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

Connect an agent — have() is free.