bes-dev / MobileStyleGAN.pytorch

An official implementation of MobileStyleGAN in PyTorch
Apache License 2.0
672 stars 81 forks source link

Need some advice on how to use the repo to train a big dataset. #35

Open zydjohnHotmail opened 2 years ago

zydjohnHotmail commented 2 years ago

Hello: I am new to Pytorch, and I want to learn how to use StyleGan2, and I found a big dataset from here: https://github.com/NVlabs/metfaces-dataset

I download the datasets and found the data is huge, more than 17GB on disk. If I want to train the dataset and export the trained model in an ONNX format. How I can start? I have Python 3.9 on Windows 10, and Pytorch version 1.11.0. My PC has 16-core CPU with 128GB RAM with a NVIDIA graphics card, so I think hardware is good enough to start a big project. Thanks,

bes-dev commented 2 years ago

@zydjohnHotmail hi, thanks for interesting to our project. So, our framework is only for compression of the pretrained StyleGAN2 models, not for training from scratch. To use our framework for your custom dataset, firstly you need to train StyleGAN2 model using external tool https://github.com/rosinality/stylegan2-pytorch, after you can follow README.md of the our repo to compress and convert to ONNX.

zydjohnHotmail commented 2 years ago

Hello: Can I use the repo to convert pre-trained StyleGAN2 models to ONNX?

bes-dev commented 2 years ago

@zydjohnHotmail no, we support ONNX/CoreML export only for MobileStyleGAN

zydjohnHotmail commented 2 years ago

Hello: Could you please provide some links where I can download pre-trained MobileStyleGAN models, so I can do some testing. Thanks,

bes-dev commented 2 years ago

@zydjohnHotmail https://github.com/bes-dev/MobileStyleGAN.pytorch#pretrained-models

zydjohnHotmail commented 2 years ago

Hello: F:\Python\MobileStyleGAN.pytorch-develop>pip install -r requirements.txt Collecting git+git://github.com/fbcotter/pytorch_wavelets.git (from -r requirements.txt (line 9)) Cloning git://github.com/fbcotter/pytorch_wavelets.git to c:\users\john\appdata\local\temp\pip-req-build-fvhd01ni Running command git clone --filter=blob:none --quiet git://github.com/fbcotter/pytorch_wavelets.git 'C:\Users\John\AppData\Local\Temp\pip-req-build-fvhd01ni' fatal: remote error: The unauthenticated git protocol on port 9418 is no longer supported. Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information. error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet git://github.com/fbcotter/pytorch_wavelets.git 'C:\Users\John\AppData\Local\Temp\pip-req-build-fvhd01ni' did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet git://github.com/fbcotter/pytorch_wavelets.git 'C:\Users\John\AppData\Local\Temp\pip-req-build-fvhd01ni' did not run successfully. │ exit code: 128 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

F:\Python\MobileStyleGAN.pytorch-develop> It seems some requirements can't be meet. Did you see this error before?

bes-dev commented 2 years ago

nope, you have some problems with your git settings