Patrick Esser commited on
Commit
49117c2
β€’
1 Parent(s): 635548d

add inpainting model

Browse files

Former-commit-id: 32a9661b4eb92cfd0c6f74e7223fdf8b036b868e

Files changed (2) hide show
  1. README.md +15 -2
  2. scripts/download_models.sh +2 -5
README.md CHANGED
@@ -70,10 +70,23 @@ We provide a first script for sampling from our unconditional models. Start it v
70
  CUDA_VISIBLE_DEVICES=<GPU_ID> python scripts/sample_diffusion.py -r models/ldm/<model_spec>/model.ckpt -l <logdir> -n <\#samples> --batch_size <batch_size> -c <\#ddim steps> -e <\#eta>
71
  ```
72
 
73
- ## Coming Soon...
74
-
75
  ![inpainting](assets/inpainting.png)
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  * Code for training LDMs and the corresponding compression models.
78
  * Inference scripts for conditional LDMs for various conditioning modalities.
79
  * In the meantime, you can play with our colab notebook https://colab.research.google.com/drive/1xqzUi2iXQXDqXBHQGP9Mqt2YrYW6cx-J?usp=sharing
 
70
  CUDA_VISIBLE_DEVICES=<GPU_ID> python scripts/sample_diffusion.py -r models/ldm/<model_spec>/model.ckpt -l <logdir> -n <\#samples> --batch_size <batch_size> -c <\#ddim steps> -e <\#eta>
71
  ```
72
 
73
+ # Inpainting
 
74
  ![inpainting](assets/inpainting.png)
75
 
76
+ Download the pre-trained weights
77
+ ```
78
+ wget -O models/ldm/inpainting_big/last.ckpt https://heibox.uni-heidelberg.de/f/4d9ac7ea40c64582b7c9/?dl=1
79
+ ```
80
+
81
+ and sample with
82
+ ```
83
+ python scripts/inpaint.py --indir data/inpainting_examples/ --outdir outputs/inpainting_results
84
+ ```
85
+ `indir` should contain images `*.png` and masks `<image_fname>_mask.png` like
86
+ the examples provided in `data/inpainting_examples`.
87
+
88
+ ## Coming Soon...
89
+
90
  * Code for training LDMs and the corresponding compression models.
91
  * Inference scripts for conditional LDMs for various conditioning modalities.
92
  * In the meantime, you can play with our colab notebook https://colab.research.google.com/drive/1xqzUi2iXQXDqXBHQGP9Mqt2YrYW6cx-J?usp=sharing
scripts/download_models.sh CHANGED
@@ -8,7 +8,7 @@ wget -O models/ldm/cin256/model.zip https://ommer-lab.com/files/latent-diffusion
8
  wget -O models/ldm/semantic_synthesis512/model.zip https://ommer-lab.com/files/latent-diffusion/semantic_synthesis.zip
9
  wget -O models/ldm/bsr_sr/model.zip https://ommer-lab.com/files/latent-diffusion/sr_bsr.zip
10
  wget -O models/ldm/layout2img-openimages256/model.zip https://ommer-lab.com/files/latent-diffusion/layout2img_model.zip
11
- wget -O models/ldm/inpainting_big/model.zip #TODO @patrick add path
12
 
13
 
14
 
@@ -39,7 +39,4 @@ unzip -o model.zip
39
  cd ../layout2img-openimages256
40
  unzip -o model.zip
41
 
42
- cd ../inpainting_big
43
- unzip -o model.zip
44
-
45
- cd ../..
 
8
  wget -O models/ldm/semantic_synthesis512/model.zip https://ommer-lab.com/files/latent-diffusion/semantic_synthesis.zip
9
  wget -O models/ldm/bsr_sr/model.zip https://ommer-lab.com/files/latent-diffusion/sr_bsr.zip
10
  wget -O models/ldm/layout2img-openimages256/model.zip https://ommer-lab.com/files/latent-diffusion/layout2img_model.zip
11
+ wget -O models/ldm/inpainting_big/last.ckpt https://heibox.uni-heidelberg.de/f/4d9ac7ea40c64582b7c9/?dl=1
12
 
13
 
14
 
 
39
  cd ../layout2img-openimages256
40
  unzip -o model.zip
41
 
42
+ cd ../..