Skip to content

Commit

Permalink
220811 fix Replicate demo issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gwang-kim committed Aug 11, 2022
1 parent bf4e0ed commit c427d87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# DiffusionCLIP: Text-Guided Diffusion Models for Robust Image Manipulation (CVPR 2022)

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1E8QHZ3BbkF6hzk0rRKzhfkySmYf_BZaE?usp=sharing) [![arXiv](https://img.shields.io/badge/paper-cvpr2022-cyan)](https://openaccess.thecvf.com/content/CVPR2022/html/Kim_DiffusionCLIP_Text-Guided_Diffusion_Models_for_Robust_Image_Manipulation_CVPR_2022_paper.html) [![arXiv](https://img.shields.io/badge/arXiv-2110.02711-red)](https://arxiv.org/abs/2110.02711)
[![Replicate](https://replicate.com/gwang-kim/diffusionclip/badge)](https://replicate.com/gwang-kim/diffusionclip) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1E8QHZ3BbkF6hzk0rRKzhfkySmYf_BZaE?usp=sharing) [![arXiv](https://img.shields.io/badge/paper-cvpr2022-cyan)](https://openaccess.thecvf.com/content/CVPR2022/html/Kim_DiffusionCLIP_Text-Guided_Diffusion_Models_for_Robust_Image_Manipulation_CVPR_2022_paper.html) [![arXiv](https://img.shields.io/badge/arXiv-2110.02711-red)](https://arxiv.org/abs/2110.02711)
[![video](https://img.shields.io/badge/video-green)](https://youtu.be/YVCtaXw6fw8) [![poster](https://img.shields.io/badge/poster-orange)](https://drive.google.com/file/d/1QgRFIRba492dCZ6v7BcZB9zqyp91aTjL/view?usp=sharing)
[![Replicate](https://replicate.com/cjwbw/diffusionclip/badge)](https://replicate.com/cjwbw/diffusionclip)

<p align="center">

<img src="https://github.com/submission10095/DiffusionCLIP_temp/blob/master/imgs/main1.png" />
Expand Down
3 changes: 2 additions & 1 deletion predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def predict(
os.makedirs(exp_dir, exist_ok=True)

# Test arg, config
align_face = 1 if manipulation == "Human face manipulation" else 0
n_inv_step = 40
args_dic = {
"config": self.configs[manipulation],
Expand All @@ -135,7 +136,7 @@ def predict(
"deterministic_inv": 1,
"hybrid_noise": 0,
"n_iter": 1,
"align_face": 0,
"align_face": align_face,
"image_folder": exp_dir,
"model_ratio": degree_of_change,
"edit_attr": None,
Expand Down
2 changes: 1 addition & 1 deletion utils/align_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


def run_alignment(image_path, output_size):
if not os.path.exists("shape_predictor_68_face_landmarks.dat"):
if not os.path.exists("pretrained/shape_predictor_68_face_landmarks.dat"):
print('Downloading files for aligning face image...')
os.system(f'wget -P pretrained/ http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2')
os.system('bzip2 -dk pretrained/shape_predictor_68_face_landmarks.dat.bz2')
Expand Down

0 comments on commit c427d87

Please sign in to comment.