Papers › Magnet: We Never Know How Text-to-Image Diffusion Models Work, Until We Learn How...

Magnet: We Never Know How Text-to-Image Diffusion Models Work, Until We Learn How Vision-Language Models Function

30 Sep 2024arXiv:2409.19967archive 2025-07-28

Chenyi Zhuang, Ying Hu, Pan Gao

Text-to-image diffusion models particularly Stable Diffusion, have revolutionized the field of computer vision. However, the synthesis quality often deteriorates when asked to generate images that faithfully represent complex prompts involving multiple attributes and objects. While previous studies suggest that blended text embeddings lead to improper attribute binding, few have explored this in depth. In this work, we critically examine the limitations of the CLIP text encoder in understanding attributes and investigate how this affects diffusion models. We discern a phenomenon of attribute bias in the text space and highlight a contextual issue in padding embeddings that entangle different concepts. We propose \textbf{Magnet}, a novel training-free approach to tackle the attribute binding problem. We introduce positive and negative binding vectors to enhance disentanglement, further with a neighbor strategy to increase accuracy. Extensive experiments show that Magnet significantly improves synthesis quality and binding accuracy with negligible computational cost, enabling the generation of unconventional and unnatural concepts.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2409.19967")

Code

Syntology Ran 11 of 17 code samples harvested from 1 repository linked to this paper; 6 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 9 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 11 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

i2-multimedia-lab/magnet officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 11 ran; 1 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
9ran
6unverified

Licence: 17 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from I2-Multimedia-Lab/Magnet. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

aggregate_attention I2-Multimedia-Lab/Magnet/utils/ptp_utils.py official repository ran no licence file found · pointer only · a020c1a6b1012624 · report
check_emb_len I2-Multimedia-Lab/Magnet/emb_swap_cases.py official repository ran fingerprinted no licence file found · pointer only · 6d5cc44492ef32f9 · report
check_prompt I2-Multimedia-Lab/Magnet/utils/magnet_utils.py official repository ran fingerprinted no licence file found · pointer only · a868f49a58f3b0c1 · report
get_eot i2-multimedia-lab/magnet/utils/magnet.py official repository ran · honoured contract no licence file found · pointer only · eb532e7a9ef53248 · report
get_image_grid I2-Multimedia-Lab/Magnet/utils/vis_utils.py official repository ran no licence file found · pointer only · 0078d117f74b7c20 · report
get_span I2-Multimedia-Lab/Magnet/utils/magnet_utils.py official repository ran no licence file found · pointer only · 7dece29f90f88c51 · report
modify_prompt I2-Multimedia-Lab/Magnet/utils/magnet_utils.py official repository ran no licence file found · pointer only · 4af52c62cce564b4 · report
rescale_noise_cfg I2-Multimedia-Lab/Magnet/pipeline_sdxl.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · bea2d776a332f2b0 · report
retrieve_timesteps I2-Multimedia-Lab/Magnet/pipeline_sdxl.py official repository ran no licence file found · pointer only · 35717b791550ecb2 · report
text_under_image I2-Multimedia-Lab/Magnet/utils/ptp_utils.py official repository ran no licence file found · pointer only · d9c8674eef29679e · report
view_images I2-Multimedia-Lab/Magnet/utils/ptp_utils.py official repository ran no licence file found · pointer only · e7fa6472a34f3407 · report
get_depth I2-Multimedia-Lab/Magnet/run_with_controlnet.py official repository unverified no licence file found · pointer only · d2e162bceb23fb8b · report
get_magnet_direction i2-multimedia-lab/magnet/utils/magnet.py official repository unverified no licence file found · pointer only · cbf4b4066353af0f · report
get_prompt_embeds I2-Multimedia-Lab/Magnet/utils/magnet.py official repository unverified no licence file found · pointer only · 998dcc4cecba3160 · report
get_prompt_embeds_with_eid i2-multimedia-lab/magnet/utils/magnet.py official repository unverified no licence file found · pointer only · 7baabbc4bf6672c9 · report
load_bert I2-Multimedia-Lab/Magnet/utils/magnet.py official repository unverified no licence file found · pointer only · dce65a9d6d0c8f13 · report
show_image_relevance I2-Multimedia-Lab/Magnet/utils/vis_utils.py official repository unverified no licence file found · pointer only · 53e98bbf6844233a · report

Tasks

AttributeDisentanglement

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

CLIPDiffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections