Views
No views yet

pip install -r requirements.txttorch and torchvision in requirement.txt, and install the appropriate version of torch and torchvision according to the instructions on PyTorch.model_path to your local directory.python app.py1python main.py \
2 --image_path_0 [image_path_0] --image_path_1 [image_path_1] \
3 --prompt_0 [prompt_0] --prompt_1 [prompt_1] \
4 --output_path [output_path] \
5 --use_adain --use_reschedule --save_inter--image_path_0: Path of the first image (default: "")--prompt_0: Prompt of the first image (default: "")--image_path_1: Path of the second image (default: "")--prompt_1: Prompt of the second image (default: "")--model_path: Pretrained model path (default: "stabilityai/stable-diffusion-2-1-base")--output_path: Path of the output image (default: "")--save_lora_dir: Path of the output lora directory (default: "./lora")--load_lora_path_0: Path of the lora directory of the first image (default: "")--load_lora_path_1: Path of the lora directory of the second image (default: "")--use_adain: Use AdaIN (default: False)--use_reschedule: Use reschedule sampling (default: False)--lamb: Hyperparameter $\lambda \in [0,1]$ for self-attention replacement, where a larger $\lambda$ indicates more replacements (default: 0.6)--fix_lora_value: Fix lora value (default: LoRA Interpolation, not fixed)--save_inter: Save intermediate results (default: False)--num_frames: Number of frames to generate (default: 50)--duration: Duration of each frame (default: 50)1python main.py \
2 --image_path_0 ./assets/Trump.jpg --image_path_1 ./assets/Biden.jpg \
3 --prompt_0 "A photo of an American man" --prompt_1 "A photo of an American man" \
4 --output_path "./results/Trump_Biden" \
5 --use_adain --use_reschedule --save_inter1python main.py \
2 --image_path_0 ./assets/vangogh.jpg --image_path_1 ./assets/pearlgirl.jpg \
3 --prompt_0 "An oil painting of a man" --prompt_1 "An oil painting of a woman" \
4 --output_path "./results/vangogh_pearlgirl" \
5 --use_adain --use_reschedule --save_inter1python main.py \
2 --image_path_0 ./assets/lion.png --image_path_1 ./assets/tiger.png \
3 --prompt_0 "A photo of a lion" --prompt_1 "A photo of a tiger" \
4 --output_path "./results/lion_tiger" \
5 --use_adain --use_reschedule --save_inter1@article{zhang2023diffmorpher,
2 title={DiffMorpher: Unleashing the Capability of Diffusion Models for Image Morphing},
3 author={Zhang, Kaiwen and Zhou, Yifan and Xu, Xudong and Pan, Xingang and Dai, Bo},
4 journal={arXiv preprint arXiv:2312.07409},
5 year={2023}
6}