(py38_gan) python main.py --mode sample --num_domains 2 --resume_iter 100000 --w_hpf 1 --checkpoint_dir expr/checkpoints/celeba_hq --result_dir expr/results/celeba_hq --src_dir assets/representative/celeba_hq/src_0 --ref_dir assets/representative/celeba_hq/ref_0
Namespace(batch_size=8, beta1=0.0, beta2=0.99, checkpoint_dir='expr/checkpoints/celeba_hq', ds_iter=100000, eval_dir='expr/eval', eval_every=50000, f_lr=1e-06, hidden_dim=512, img_size=256, inp_dir='assets/representative/custom/female', lambda_cyc=1, lambda_ds=1, lambda_reg=1, lambda_sty=1, latent_dim=16, lm_path='expr/checkpoints/celeba_lm_mean.npz', lr=0.0001, mode='sample', num_domains=2, num_outs_per_domain=10, num_workers=4, out_dir='assets/representative/celeba_hq/src/female', print_every=10, randcrop_prob=0.5, ref_dir='assets/representative/celeba_hq/ref_0', result_dir='expr/results/celeba_hq', resume_iter=100000, sample_dir='expr/samples', sample_every=5000, save_every=10000, seed=777, src_dir='assets/representative/celeba_hq/src_0', style_dim=64, total_iters=100000, train_img_dir='data/celeba_hq/train', val_batch_size=32, val_img_dir='data/celeba_hq/val', w_hpf=1.0, weight_decay=0.0001, wing_path='expr/checkpoints/wing.ckpt')
Number of parameters of generator: 43467395
Number of parameters of mapping_network: 2438272
Number of parameters of style_encoder: 20916928
Number of parameters of discriminator: 20852290
Number of parameters of fan: 6333603
Initializing generator...
Initializing mapping_network...
Initializing style_encoder...
Initializing discriminator...
Preparing DataLoader for the generation phase...
Preparing DataLoader for the generation phase...
Loading checkpoint from expr/checkpoints/celeba_hq\100000_nets_ema.ckpt...
Working on expr/results/celeba_hq\reference.jpg...
Working on expr/results/celeba_hq\video_ref.mp4...
video_ref: 100%|█████████████████████████████████████████| 2/2 [00:00<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 182, in <module>
main(args)
File "main.py", line 73, in main
solver.sample(loaders)
File "C:\Users\izuts\anaconda3\envs\py38_gan\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "N:\anaconda_win\work\stargan-v2\core\solver.py", line 190, in sample
utils.video_ref(nets_ema, args, src.x, ref.x, ref.y, fname)
File "C:\Users\izuts\anaconda3\envs\py38_gan\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "N:\anaconda_win\work\stargan-v2\core\utils.py", line 222, in video_ref
video.append(frames[-1:])
UnboundLocalError: local variable 'frames' referenced before assignment