MCPcopy Index your code
hub / github.com/bytedance/StyleSSP

github.com/bytedance/StyleSSP @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
524 symbols 1,498 edges 39 files 84 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

[CVPR 2025] StyleSSP: Sampling StartPoint Enhancement for Training-free Diffusion-based Method for Style Transfer

Arxiv

imgs

Usage

To run the code, please follow these step:

  1. Download
  2. Setup
  3. Run

Download

This project contains contributions from ControlNet and IP-Adapter-Instruct, licensed under the Apache License 2.0. Modifications and additional content added by StyleSSP in 2024. The pre-trained checkpoints from Tile-ControlNet, MistoLine, IP-Adapter-Instruct

# download adapters
huggingface-cli download --resume-download h94/IP-Adapter --local-dir checkpoints/IP-Adapter

# download ControlNets
huggingface-cli download --resume-download TheMistoAI/MistoLine --local-dir checkpoints/MistoLine
huggingface-cli download --resume-download xinsir/controlnet-tile-sdxl-1.0 --local-dir checkpoints/controlnet-tile-sdxl-1.0

# download models IP-Adapter-Instruct
download the models ckpt ip-adapter-instruct-sdxl.bin from: https://huggingface.co/CiaraRowles/IP-Adapter-Instruct and put it in the folder checkpoints/models

Environment Setup

conda env create -f environment.yaml
conda activate StyleSSP
pip install git+https://github.com/openai/CLIP.git

Run

For running StyleSSP, modify content_image_dir and style_image_dir in src/config.py, then run:

python infer_style.py

Evaluation

For a quantitative evaluation, we incorporate a set of randomly selected inputs from MS-COCO and WikiArt in "./data" directory, as InstantStyle-Plus do.

Before executing evalution code, please run infer_style.py to get the results (40 styles, 20 contents -> 800 stylized images), then put the content, style and stylized images in "./data_evl/content", "./data_evl/style", and "./data_evl/tar" directory, respectively.

Then, run:

cd evaluation;
python eval_artfid.py --sty ../data_evl/style --cnt ../data_evl/content --tar ../data_evl/tar

Citation

If you find our work useful, please consider citing and star:

@article{xu2025stylessp,
  title={StyleSSP: Sampling StartPoint Enhancement for Training-free Diffusion-based Method for Style Transfer},
  author={Xu, Ruojun and Xi, Weijie and Wang, Xiaodi and Mao, Yongbo and Cheng, Zach},
  journal={arXiv preprint arXiv:2501.11319},
  year={2025}
}

Core symbols most depended-on inside this repo

encode_prompt
called by 10
ip_adapter/pipeline_stable_diffusion_extra_cfg.py
get_decouple_embeds
called by 10
ip_adapter/ip_adapter_instruct.py
scale_model_input
called by 10
src/schedulers/euler_scheduler.py
get_image_paths
called by 8
evaluation/eval_artfid.py
step
called by 6
src/schedulers/lcm_scheduler.py
normalize
called by 6
evaluation/image_metrics.py
FeedForward
called by 5
ip_adapter/resampler_Instruct.py
_get_clip_prompt_embeds
called by 4
ip_adapter/pipeline_stable_diffusion_sd3_extra_cfg.py

Shape

Method 329
Function 111
Class 84

Languages

Python100%

Modules by API surface

src/evaluate/inception.py32 symbols
evaluation/inception.py32 symbols
ip_adapter/ip_adapter_instruct.py29 symbols
pipeline_controlnet_inpaint_sd_xl.py28 symbols
pipeline_controlnet_sd_xl_img2img_plus.py27 symbols
pipeline_controlnet_sd_xl_img2img.py27 symbols
src/evaluate/image_metrics.py26 symbols
evaluation/image_metrics.py26 symbols
ip_adapter/ip_adapter.py25 symbols
ip_adapter/pipeline_stable_diffusion_sdxl_extra_cfg.py22 symbols
ip_adapter/pipeline_stable_diffusion_extra_cfg.py22 symbols
ip_adapter/resampler_Instruct.py20 symbols

For agents

$ claude mcp add StyleSSP \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact