Skip to content

Commit c082d4a

Browse files
committed
Merge branch 'timotheschmidt/add-weight-vector' of https://github.com/EmoTim/stylegan2-ada-pytorch into timotheschmidt/add-weight-vector
2 parents af6563b + 3cf1048 commit c082d4a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

generate.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def generate_images(
233233
age_estimator = None
234234
if weight_vector is not None:
235235
print("Initializing age estimator...")
236-
age_estimator = AgeEstimator(ctx_id=-1, det_size=(640, 640))
236+
age_estimator = AgeEstimator()
237237

238238
# Generate images.
239239
all_images = [] # Store images for composite: list of lists (one per seed)
@@ -369,15 +369,18 @@ def generate_images(
369369

370370
if __name__ == "__main__":
371371
import sys
372+
os.chdir("/home/sagemaker-user/stylegan2-ada-pytorch")
372373

373374
# Default arguments for debugging/development
374375
if len(sys.argv) == 1:
375376
sys.argv = [
376377
"generate.py",
377-
"--outdir=stylegan2-ada-pytorch/out",
378+
"--outdir=out",
378379
"--trunc=0.7",
379380
"--seeds=600-605",
380-
"--weight-vector=stylegan2-ada-pytorch/weight.npy",
381+
"--style-range", "0", "4",
382+
"--alphas=0:0:1",
383+
"--weight-vector=weight.npy",
381384
"--network=https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada-pytorch/pretrained/ffhq.pkl",
382385
]
383386

0 commit comments

Comments
 (0)