SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.10385 · 2024

Mamba-ST: State Space Model for Efficient Style Transfer

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 9 functions out of this paper's own repositories and ran 7 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
filippobotti/mambast canonical 7 of 9
FunctionStatusWhere it lives
calc_mean_std Ran filippobotti/mambast/function.py
pointer only (licence: NONE) · get_code("38eaf8511dc7bc9c")
drop_path Ran filippobotti/mambast/models/ViT_helper.py
pointer only (licence: NONE) · get_code("3ac6b7d76e8e3584")
normal Ran filippobotti/mambast/function.py
pointer only (licence: NONE) · get_code("9cfa20df1a35d293")
prepare_input Ran filippobotti/mambast/eval_time.py
pointer only (licence: NONE) · get_code("9e863e83a72788dd")
select_random_images Ran filippobotti/mambast/eval_time.py
pointer only (licence: NONE) · get_code("2ff189d76125d03c")
test_transform Ran filippobotti/mambast/eval_time.py
pointer only (licence: NONE) · get_code("44b1906941c2c3ed")
trunc_normal_ Ran filippobotti/mambast/models/ViT_helper.py
pointer only (licence: NONE) · get_code("02566da69866c48c")
build_transformer Not yet run filippobotti/mambast/models/mamba.py
pointer only (licence: NONE) · get_code("163a3014ed2dbf50")
calc_mean_std1 Not yet run filippobotti/mambast/function.py
pointer only (licence: NONE) · get_code("e956b4737851263c")

Repositories linked to this paper

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

Abstract

The goal of style transfer is, given a content image and a style source, generating a new image preserving the content but with the artistic representation of the style source. Most of the state-of-the-art architectures use transformers or diffusion-based models to perform this task, despite the heavy computational burden that they require. In particular, transformers use self- and cross-attention layers which have large memory footprint, while diffusion models require high inference time. To overcome the above, this paper explores a novel design of Mamba, an emergent State-Space Model (SSM), called Mamba-ST, to perform style transfer. To do so, we adapt Mamba linear equation to simulate the behavior of cross-attention layers, which are able to combine two separate embeddings into a single output, but drastically reducing memory usage and time complexity. We modified the Mamba's inner equations so to accept inputs from, and combine, two separate data streams. To the best of our knowledge, this is the first attempt to adapt the equations of SSMs to a vision task like style transfer without requiring any other module like cross-attention or custom normalization layers. An extensive set of experiments demonstrates the superiority and efficiency of our method in performing style transfer compared to transformers and diffusion models. Results show improved quality in terms of both ArtFID and FID metrics. Code is available at https://github.com/FilippoBotti/MambaST.

For agents

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

get_harvested_code_for_paper("2409.10385")
get_code_for_paper("2409.10385")
have("2409.10385")

Connect an agent — have() is free.