Skip to content

Commit 32a16da

Browse files
authored
chore: Switch WD14 captioning deps to ONNX Runtime from Tensorflow (#73)
1 parent 2c626fd commit 32a16da

3 files changed

Lines changed: 77 additions & 238 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ sudo docker run --rm --gpus all \
9595
--v_parameterization
9696
```
9797

98-
### Example: WD14 Captioning (Tensorflow)
98+
### Example: WD14 Captioning (ONNX)
9999

100100
```shell
101101
mkdir -p "./cache/wd14_tagger_model_cache"
@@ -110,5 +110,6 @@ sudo docker run --rm --gpus all \
110110
aoirint/sd_scripts \
111111
finetune/tag_images_by_wd14_tagger.py \
112112
--model_dir "/wd14_tagger_model_cache/wd14_tagger_model" \
113+
--onnx \
113114
/work/my_dataset-20230715.1/img
114115
```

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ dependencies = [
3131
"requests==2.32.4",
3232
"timm==0.6.12",
3333
"fairscale==0.4.13",
34-
# for WD14 captioning (tensorflow)
35-
"tensorflow==2.12.1",
34+
# for WD14 captioning (onnx)
35+
"onnx==1.15.0",
36+
"onnxruntime-gpu==1.17.1",
3637
# open clip for SDXL
3738
"open-clip-torch==2.20.0",
3839
# For logging

0 commit comments

Comments
 (0)