-
Notifications
You must be signed in to change notification settings - Fork 1
/
stylegan2-use-dataset.yaml
54 lines (50 loc) · 1.49 KB
/
stylegan2-use-dataset.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
defaults:
resources:
instance-type: P4000
jobs:
CloneRepo:
outputs:
repo:
type: dataset
with:
id: "dsrepfvwux4drca" #managed storage provider dataset
uses: container@v1
with:
args:
- clone
- https://github.com/NVlabs/stylegan2.git
- /outputs/repo/stylegan2
image: alpine/git
GetPretrainedModel:
outputs:
pretrainedNetwork:
type: dataset
with:
id: "dsrepfvwux4drca" #managed storage provider dataset
uses: container@v1
with:
args:
- wget
- https://nvlabs-fi-cdn.nvidia.com/stylegan2/networks/stylegan2-ffhq-config-f.pkl
- -P
- /outputs/pretrainedNetwork
image: alpine:latest
StyleGan2:
needs:
- CloneRepo
- GetPretrainedModel
inputs:
repo: CloneRepo.outputs.repo
pretrainedNetwork: GetPretrainedModel.outputs.pretrainedNetwork
outputs:
generatedFaces:
type: dataset
with:
id: "dsrepfvwux4drca" #managed storage provider dataset
uses: container@v1
with:
args:
- bash
- -c
- pip install scipy==1.3.3 && pip install requests==2.22.0 && pip install Pillow==6.2.1 && cp -R /inputs/repo/stylegan2 /stylegan2 && cd /stylegan2 && python run_generator.py generate-images --network=/inputs/pretrainedNetwork/stylegan2-ffhq-config-f.pkl --seeds=6600-6605 --truncation-psi=0.5 --result-dir=/outputs/generatedFaces
image: tensorflow/tensorflow:1.14.0-gpu-py3