stargan-v2
stargan-v2 copied to clipboard
Needs help!
Hi,
First, it's a great project, and thank you for sharing the documents and codes. However, I have encountered two issues listed below. Thanks again for your help in advance!
- x264 cannot be installed? (stargan-v2) C:\Users\xxx\stargan-v2>conda install x264=='1!152.20180717' ffmpeg=4.0.2 -c conda-forge
CondaValueError: invalid package specification: x264=='1152.20180717
- When running the script in CMD in windows 10, the error shows as below:
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 --ref_dir assets/representative/celeba_hq/ref
Error message:
Traceback (most recent call last):
File "main.py", line 182, in
We don't have an answer for Q1. We tested our code on linux only. Maybe someone else with windows experience could provide some help here.
Q2 is resolved in #3 . Hope it helps.
Getting the same issue in Windows 10 CMD Error message: Traceback (most recent call last): File "main.py", line 182, in main(args) File "main.py", line 37, in main solver = Solver(args) File "C:\Users\xxx\stargan-v2\core\solver.py", line 58, in init self.ckptios = [CheckpointIO(ospj(args.checkpoint_dir, '{:06d}_nets_ema.ckpt'), **self.nets_ema)] File "C:\Users\xxx\stargan-v2\core\checkpoint.py", line 17, in init os.makedirs(os.path.dirname(fname_template), exist_ok=True) File "C:\Users\xxx.conda\envs\stargan-v2\lib\os.py", line 220, in makedirs mkdir(name, mode) FileNotFoundError: [WinError 3] The system cannot find the path specified: '{:'
modify 58 line of solver.py to
self.ckptios = [CheckpointIO(ospj(args.checkpoint_dir, '100000_nets_ema.ckpt'), self.nets_ema)]
and modify init function of checkpoint.py
def init(self, fname_template, module_list): os.makedirs(os.path.dirname(fname_template), exist_ok=True) self.fname_template = fname_template self.module_dict = module_list
It's work at Windows
modify 58 line of solver.py to
self.ckptios = [CheckpointIO(ospj(args.checkpoint_dir, '100000_nets_ema.ckpt'), self.nets_ema)]
and modify init function of checkpoint.py
def init(self, fname_template, module_list): os.makedirs(os.path.dirname(fname_template), exist_ok=True) self.fname_template = fname_template self.module_dict = module_list
It's work at Windows
Why does this error appear when I run it in windows after I modified it as you said?
Traceback (most recent call last):
File "main.py", line 21, in
(stargan-v2) E:\sxc\stargan-v2-master>python main.py --mode train --num_domains 1 --w_hpf 1 --lambda_reg 1 --lambda_sty 1 --lam
bda_ds 1 --lambda_cyc 1 --train_img_dir data/airplane/train --val_img_dir data/airplane/val
Traceback (most recent call last):
File "main.py", line 21, in
(stargan-v2) E:\sxc\stargan-v2-master>python main.py --mode train --num_domains 1 --w_hpf 1 --lambda_reg 1 --lambda_sty 1 --lam
bda_ds 1 --lambda_cyc 1 --train_img_dir data/airplane/train --val_img_dir data/airplane/val
Traceback (most recent call last):
File "main.py", line 21, in
Q1: setup ffmpeg-4.4.1-essentials_build first, download from https://ffmpeg.org/download.html#build-windows; then pip install ffmpeg-python, not ffmpeg. this works for me.
I tried your method. It passed the Q2, but brings a new problem: AttributeError: 'CheckpointIO' object has no attribute 'data_parallel'
remove checkpoint.py line 17 checkpoint.py .And create expr in the root directory, and create checkpoints under expr.
Hello, how to download the dataset in the Chinese mainland and in the window environment, I encountered some problems when downloading the dataset: download.sh: line 46: wget: command not found unzip: cannot find or open ./data/afhq.zip, ./data/afhq.zip.zip or ./data/afhq.zip.ZIP. rm: cannot remove './data/afhq.zip': No such file or directory
Replace all the '{:06d}' as '{06d}', it will work on Windows platform!
modify 58 line of solver.py to
self.ckptios = [CheckpointIO(ospj(args.checkpoint_dir, '100000_nets_ema.ckpt'), self.nets_ema)]
and modify init function of checkpoint.py
def init(self, fname_template, module_list): os.makedirs(os.path.dirname(fname_template), exist_ok=True) self.fname_template = fname_template self.module_dict = module_list
It's work at Windows
I don't recommend doing this, because each saved model overwrites the last