Papers › Visual Style Prompting with Swapping Self-Attention

Visual Style Prompting with Swapping Self-Attention

20 Feb 2024arXiv:2402.12974archive 2025-07-28

Jaeseok Jeong, Junho Kim, Yunjey Choi, Gayoung Lee, Youngjung Uh

In the evolving domain of text-to-image generation, diffusion models have emerged as powerful tools in content creation. Despite their remarkable capability, existing models still face challenges in achieving controlled generation with a consistent style, requiring costly fine-tuning or often inadequately transferring the visual elements due to content leakage. To address these challenges, we propose a novel approach, \ours, to produce a diverse range of images while maintaining specific style elements and nuances. During the denoising process, we keep the query from original features while swapping the key and value with those from reference features in the late self-attention layers. This approach allows for the visual style prompting without any fine-tuning, ensuring that generated images maintain a faithful style. Through extensive evaluation across various styles and text prompts, our method demonstrates superiority over existing approaches, best reflecting the style of the references and ensuring that resulting images match the text prompts most accurately. Our project page is available https://curryjung.github.io/VisualStylePrompt/.

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="2402.12974")

Code

Syntology Ran 15 of 16 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 1 ran · our draft was wrong; 14 ran with no contract checked.

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

naver-ai/Visual-Style-Prompting officialmentioned on GitHubpytorchApache-2.0 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

16 samples harvested; 15 ran; 0 honoured the contract we drafted; 1 has 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 · our draft was wrong
14ran
1unverified

Licence: 0 of the 16 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 naver-ai/Visual-Style-Prompting. “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.

calc_mean_std naver-ai/Visual-Style-Prompting/pipelines/inverted_ve_pipeline.py official repository ran fingerprinted Apache-2.0 (permissive) · 8d0ce4c22eacc88f · report
concat_first naver-ai/Visual-Style-Prompting/pipelines/inverted_ve_pipeline.py official repository ran Apache-2.0 (permissive) · 94f2cc13633a334f · report
create_image naver-ai/Visual-Style-Prompting/visualize_attention_src/utils.py official repository ran Apache-2.0 (permissive) · 91fbd520765aec84 · report
create_image_grid naver-ai/Visual-Style-Prompting/visualize_attention_src/save_attn_map_script.py official repository ran Apache-2.0 (permissive) · 8a18eb1d9dfeff92 · report
create_nested_list naver-ai/Visual-Style-Prompting/vsp_real_script.py official repository ran fingerprinted Apache-2.0 (permissive) · 840989d505e53791 · report
create_number_list naver-ai/Visual-Style-Prompting/vsp_real_script.py official repository ran fingerprinted Apache-2.0 (permissive) · a9df142d09608ec2 · report
create_prompt naver-ai/Visual-Style-Prompting/vsp_real_script.py official repository ran fingerprinted Apache-2.0 (permissive) · 56be14bdb80a0850 · report
expand_first naver-ai/Visual-Style-Prompting/pipelines/inverted_ve_pipeline.py official repository ran fingerprinted Apache-2.0 (permissive) · 197b9e6865c65770 · report
get_image naver-ai/Visual-Style-Prompting/visualize_attention_src/utils.py official repository ran Apache-2.0 (permissive) · 93d7815126d56733 · report
get_image_v2 naver-ai/Visual-Style-Prompting/visualize_attention_src/utils.py official repository ran Apache-2.0 (permissive) · a9908edbd73a4ea0 · report
init_latent naver-ai/Visual-Style-Prompting/utils.py official repository ran Apache-2.0 (permissive) · 05ba22d160ba005c · report
load_config naver-ai/Visual-Style-Prompting/utils.py official repository ran Apache-2.0 (permissive) · 8c171e27e9c1a1d0 · report
parse_config naver-ai/Visual-Style-Prompting/utils.py official repository ran Apache-2.0 (permissive) · 6b7da58f659741f1 · report
rescale_noise_cfg naver-ai/Visual-Style-Prompting/visualize_attention_src/pipeline_stable_diffusion_xl_attn.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · bea2d776a332f2b0 · report
transform_variable_name naver-ai/Visual-Style-Prompting/visualize_attention_src/save_attn_map_script.py official repository ran Apache-2.0 (permissive) · 9483beae09eebf51 · report
zero_module naver-ai/Visual-Style-Prompting/pipelines/controlnet.py official repository unverified Apache-2.0 (permissive) · da94debb8019ad46 · report

Tasks

DenoisingImage GenerationStyle TransferText to Image GenerationText-to-Image Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

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