Skip to content

Commit bfb00d3

Browse files
Johannes Ballécopybara-github
authored andcommitted
Updates HiFiC installation instructions.
PiperOrigin-RevId: 364579660 Change-Id: Ib86dd4d679de2b65c562c96df51641926ca69b77
1 parent d442cd8 commit bfb00d3

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

models/hific/README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Use `tfci.py` for locally running our models to encode and decode images:
3838

3939
```bash
4040
git clone https://github.com/tensorflow/compression
41-
cd compression/compression/models
41+
cd compression/models
4242
python tfci.py compress <model> <PNG file>
4343
```
4444

@@ -49,22 +49,19 @@ where `model` can be one of `"hific-lo", "hific-mi", "hific-hi"`.
4949

5050
## Using the code
5151

52+
To use the code, create a conda environment using Python 3.7, and the packages
53+
listed in
54+
[requirements.txt](https://github.com/tensorflow/compression/blob/master/models/hific/requirements.txt).
5255

53-
To use the code, create a conda environment using Python 3.6
54-
(newer is not supported at the moment), and the following packages.
55-
56-
**NOTE**: We only support CUDA 10.0, Python 3.6, and TensorFlow 1.15.
57-
TensorFlow must be installed via pip, not conda.
58-
Any other setup is not going to work (we tested newer versions of Tensorflow
59-
and Python and they don't work). We're working on a fix.
56+
**NOTE**: At the moment, we only support CUDA 10.0, Python 3.6-3.7, TensorFlow
57+
1.15, and Tensorflow Compression 1.3. TensorFlow must be installed via pip, not
58+
conda. Unfortunately, newer versions of Tensorflow or Python will not work due
59+
to various constraints in the dependencies and in the TF binary API.
6060

6161
```bash
62-
conda create --name hific python=3.6 cudatoolkit=10.0 cudnn
62+
conda create --name hific python=3.7 cudatoolkit=10.0 cudnn
6363
conda activate hific
64-
pip install tensorflow-gpu==1.15 # Make sure to install TF via pip, not conda!
65-
pip install git+git://github.com/google/compare_gan@19922d3004b675c1a49c4d7515c06f6f75acdcc8
66-
pip install tensorflow-compression==1.3
67-
pip install Pillow
64+
pip install -r hific/requirements.txt
6865
```
6966

7067
#### Note on CUDNN Errors
@@ -115,7 +112,7 @@ python -m hific.train --config mselpips --ckpt_dir ckpts/mse_lpips \
115112

116113
# Once that finishes, train a GAN model:
117114
python -m hific.train --config hific --ckpt_dir ckpts/hific \
118-
--init_autoencoder_from_ckpt_dir ckpts/mselpips \
115+
--init_autoencoder_from_ckpt_dir ckpts/mse_lpips \
119116
--num_steps 1M \
120117
--tfds_dataset_name coco2014
121118
```

models/hific/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-e git+https://github.com/google/compare_gan#egg=elasticutils
1+
git+https://github.com/google/compare_gan@19922d3004b675c1a49c4d7515c06f6f75acdcc8
22
tensorflow-gpu~=1.15.2
33
tensorflow-compression==1.3
4-
Pillow~=7.1.2
4+
Pillow~=8.1.1

0 commit comments

Comments
 (0)