SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.11474 · IJCAI · 2024

Towards Highly Realistic Artistic Style Transfer via Stable Diffusion with Step-aware and Layer-aware Prompt

Lei Zhao, Jinheng Xie, Wei Xing, Zhanjie Zhang, Huaizhong Lin, Quanwei Zhang, Guangyuan Li, Junsheng Luan, Juncheng Mo, Shuaicheng Huang, Dalong Zhang, Lixia Chen

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 20 functions out of this paper's own repositories and ran 9 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
jamie-cheung/lsast canonical 6 of 10
Jamie-Cheung/LSAST — 3 of 10
FunctionStatusWhere it lives
CheckpointFunction Ran Jamie-Cheung/LSAST/cldm/cldm.py
code served (permissive licence) · get_code("69360f5b0cc8f069")
CrossAttention Ran Jamie-Cheung/LSAST/cldm/cldm.py
code served (permissive licence) · get_code("edd0dbdde64951f7")
MemoryEfficientCrossAttention Ran Jamie-Cheung/LSAST/cldm/cldm.py
code served (permissive licence) · get_code("713884729e861c62")
Normalize Ran jamie-cheung/lsast/cldm/sanet.py
code served (permissive licence) · get_code("c3a6b977022957cb")
adaptive_instance_normalization Ran jamie-cheung/lsast/cldm/cldm.py
code served (permissive licence) · get_code("a0ab4de8a03b69b0")
basic_clean Ran jamie-cheung/lsast/clip/simple_tokenizer.py
code served (permissive licence) · get_code("98f385d847636a3e")
calc_mean_std Ran jamie-cheung/lsast/cldm/cldm.py
code served (permissive licence) · get_code("6576c5264bea5331")
get_pairs Ran jamie-cheung/lsast/clip/simple_tokenizer.py
code served (permissive licence) · get_code("d919ae32e5e4e616")
whitespace_clean Ran jamie-cheung/lsast/clip/simple_tokenizer.py
code served (permissive licence) · get_code("9542161e9640b858")
AttentionBlock Not yet run Jamie-Cheung/LSAST/cldm/cldm.py
code served (permissive licence) · get_code("b6dff222c0e9edfe")
BasicTransformerBlock Not yet run Jamie-Cheung/LSAST/cldm/cldm.py
code served (permissive licence) · get_code("cd763b5f891b0938")
ControlNet_style Not yet run Jamie-Cheung/LSAST/cldm/cldm.py
code served (permissive licence) · get_code("60d938a3fe7521c0")
ResBlock Not yet run Jamie-Cheung/LSAST/cldm/cldm.py
code served (permissive licence) · get_code("66e12c88bac640da")
SpatialTransformer Not yet run Jamie-Cheung/LSAST/cldm/cldm.py
code served (permissive licence) · get_code("406611ffc8d44703")
TimestepEmbedSequential Not yet run Jamie-Cheung/LSAST/cldm/cldm.py
code served (permissive licence) · get_code("1c67e34b46237f50")
build_model Not yet run jamie-cheung/lsast/clip/model.py
code served (permissive licence) · get_code("39e6b23b55f376ea")
checkpoint Not yet run Jamie-Cheung/LSAST/cldm/cldm.py
code served (permissive licence) · get_code("21f94f83ceb82390")
get_state_dict Not yet run jamie-cheung/lsast/cldm/model.py
code served (permissive licence) · get_code("cfc17707f35e7ec4")
load Not yet run jamie-cheung/lsast/clip/clip.py
code served (permissive licence) · get_code("f6f30e41636ae569")
load_state_dict Not yet run jamie-cheung/lsast/cldm/model.py
code served (permissive licence) · get_code("df733a879693145d")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Artistic style transfer aims to transfer the learned artistic style onto an arbitrary content image, generating artistic stylized images. Existing generative adversarial network-based methods fail to generate highly realistic stylized images and always introduce obvious artifacts and disharmonious patterns. Recently, large-scale pre-trained diffusion models opened up a new way for generating highly realistic artistic stylized images. However, diffusion model-based methods generally fail to preserve the content structure of input content images well, introducing some undesired content structure and style patterns. To address the above problems, we propose a novel pre-trained diffusionbased artistic style transfer method, called LSAST, which can generate highly realistic artistic stylized images while preserving the content structure of input content images well, without bringing obvious artifacts and disharmonious style patterns. Specifically, we introduce a Step-aware and Layer-aware Prompt Space, a set of learnable prompts, which can learn the style information from the collection of artworks and dynamically adjusts the input images' content structure and style pattern. To train our prompt space, we propose a novel inversion method, called Step-ware and Layer-aware Prompt Inversion, which allows the prompt space to learn the style information of the artworks collection. In addition, we inject a pre-trained conditional branch of ControlNet into our LSAST, which further improved our framework's ability to maintain content structure. Extensive experiments demonstrate that our proposed method can generate more highly realistic artistic stylized images than the state-of-theart artistic style transfer methods. Code is available at https://github.com/Jamie-Cheung/LSAST.

For agents

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

get_harvested_code_for_paper("2404.11474")
get_code_for_paper("2404.11474")
have("2404.11474")

Connect an agent — have() is free.