Comments (10)
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
from stargan-v2.
Replace all the '{:06d}' as '{06d}', it will work on Windows platform!
from stargan-v2.
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.
from stargan-v2.
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: '{:'
from stargan-v2.
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
from core.solver import Solver
File "E:\sxc\stargan-v2-master\core\solver.py", line 22, in
from core.checkpoint import CheckpointIO
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 15, in
class CheckpointIO(object):
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 24, in CheckpointIO
self.fname_template = fname_template
NameError: name 'fname_template' is not defined
(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
from core.solver import Solver
File "E:\sxc\stargan-v2-master\core\solver.py", line 22, in
from core.checkpoint import CheckpointIO
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 15, in
class CheckpointIO(object):
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 24, in CheckpointIO
self.fname_template = fname_template
NameError: name 'fname_template' is not defined
(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
from core.solver import Solver
File "E:\sxc\stargan-v2-master\core\solver.py", line 22, in
from core.checkpoint import CheckpointIO
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 15, in
class CheckpointIO(object):
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 24, in CheckpointIO
self.fname_template = fname_template
NameError: name 'fname_template' is not defined
from stargan-v2.
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.
from stargan-v2.
I tried your method. It passed the Q2, but brings a new problem:
AttributeError: 'CheckpointIO' object has no attribute 'data_parallel'
from stargan-v2.
remove checkpoint.py line 17 checkpoint.py .And create expr in the root directory, and create checkpoints under expr.
from stargan-v2.
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
from stargan-v2.
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
from stargan-v2.
Related Issues (20)
- Changing initial latent code z for translation between domains
- The reason for not updating the style encoder for g_loss on reference images
- RuntimeError: Error(s) in loading state_dict for DataParallel
- The author's checkpoint is whether suitable for style transformer on market1501 HOT 1
- Error in transforming custom image script, and error in running the program script (to generate images and videos) HOT 4
- 😵 Uh oh! This model can't be run on Replicate because it was built with a version of Cog that is no longer supported.
- How to get a pre-trained model with the ckpt file? HOT 1
- How to change device of gpu
- Generated image didn't change when performing the task of face to anime.
- How to modify the code if use torch>1.4
- AFHQ Alignment
- why we need to label data from famale and male?
- Train own dataset
- need help
- License
- only noise output when --mode sample
- AFHQ link is disabled HOT 2
- reference.jpg showing weird non-face artifacts HOT 1
- g_loss is nan
- Inquiry on StarGAN v2 Performance Issues on RTX 3090
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stargan-v2.