UCSB-AI/photoswap
소개
Official implementation of the NeurIPS 2023 paper "Photoswap: Personalized Subject Swapping in Images"
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPhotoswap: Personalized Subject Swapping in Images
Jing Gu, Yilin Wang, Nanxuan Zhao, Tsu-Jui Fu, Wei Xiong, Qing Liu, Zhifei Zhang, He Zhang, Jianming Zhang, HyunJoon Jung, Xin Eric Wang
NeurIPS 2023
[Project Page] [Paper]

Model Architecture

TODO
- Release Benchmark
- Release code
:fire: News
- [2023.07.08] We have released our code.
Concept Learning
Training a model with your own concept
The new subject will be learned as a new token in the diffusion model. Huggingface provides scripts for training. In detail, you could use Text Inversion, DreamBooth, Custom Diffusion, or any other concept learning model. Be sure to install the package in the corresponding requirements.txt
- More source images leads to a better learnt concept and therefore a better subject swap result. For example, more human face images during training leads to a better artistic figure transfer.
- For DreamBooth, finetuning the encoder leads to a better performance, especially for human face. That would also requires more memory.
Download PHOTPSWAP models
Please contact [email protected] for checkpoints.
Attention Swap
Following the below steps to do subject swapping:
- Put the trained Diffusion Model checkpoint in
checkpointsfolder. - Install package using
requirements.txtbypip install -r requirements.txt. Note that the concept learning environment is not suitable for attention swap. - Running
real-image-swap.ipynbfor subject swapping.
Different learnt concepts could have different swap steps for successful subject swapping. Tuning the swapping step and the text prompt for better performance. A concept model that has its weights tuned will have a degration in its ability on general concept generation. To do Subject Swapping with Photoswap, a single GPU with 16 GB memory is required.
Citation
@misc{gu2023photoswap,
title={Photoswap: Personalized Subject Swapping in Images},
author={Jing Gu and Yilin Wang and Nanxuan Zhao and Tsu-Jui Fu and Wei Xiong and Qing Liu and Zhifei Zhang and He Zhang and Jianming Zhang and HyunJoon Jung and Xin Eric Wang},
year={2023},
journal={Advances in Neural Information Processing Systems}
}
관련 프로젝트 살펴보기
불러오는 중…