Code Monkey home page Code Monkey logo

stylegan3's Introduction

Alias-Free Generative Adversarial Networks (StyleGAN3)
Official PyTorch implementation of the NeurIPS 2021 paper

Teaser image

Alias-Free Generative Adversarial Networks
Tero Karras, Miika Aittala, Samuli Laine, Erik Härkönen, Janne Hellsten, Jaakko Lehtinen, Timo Aila
https://nvlabs.github.io/stylegan3

Abstract: We observe that despite their hierarchical convolutional nature, the synthesis process of typical generative adversarial networks depends on absolute pixel coordinates in an unhealthy manner. This manifests itself as, e.g., detail appearing to be glued to image coordinates instead of the surfaces of depicted objects. We trace the root cause to careless signal processing that causes aliasing in the generator network. Interpreting all signals in the network as continuous, we derive generally applicable, small architectural changes that guarantee that unwanted information cannot leak into the hierarchical synthesis process. The resulting networks match the FID of StyleGAN2 but differ dramatically in their internal representations, and they are fully equivariant to translation and rotation even at subpixel scales. Our results pave the way for generative models better suited for video and animation.

For business inquiries, please visit our website and submit the form: NVIDIA Research Licensing

Release notes

This repository is an updated version of stylegan2-ada-pytorch, with several new features:

  • Alias-free generator architecture and training configurations (stylegan3-t, stylegan3-r).
  • Tools for interactive visualization (visualizer.py), spectral analysis (avg_spectra.py), and video generation (gen_video.py).
  • Equivariance metrics (eqt50k_int, eqt50k_frac, eqr50k).
  • General improvements: reduced memory usage, slightly faster training, bug fixes.

Compatibility:

  • Compatible with old network pickles created using stylegan2-ada and stylegan2-ada-pytorch. (Note: running old StyleGAN2 models on StyleGAN3 code will produce the same results as running them on stylegan2-ada/stylegan2-ada-pytorch. To benefit from the StyleGAN3 architecture, you need to retrain.)
  • Supports old StyleGAN2 training configurations, including ADA and transfer learning. See Training configurations for details.
  • Improved compatibility with Ampere GPUs and newer versions of PyTorch, CuDNN, etc.

Synthetic image detection

While new generator approaches enable new media synthesis capabilities, they may also present a new challenge for AI forensics algorithms for detection and attribution of synthetic media. In collaboration with digital forensic researchers participating in DARPA's SemaFor program, we curated a synthetic image dataset that allowed the researchers to test and validate the performance of their image detectors in advance of the public release. Please see here for more details.

Additional material

  • Result videos
  • Curated example images
  • StyleGAN3 pre-trained models for config T (translation equiv.) and config R (translation and rotation equiv.)

    Access individual networks via https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/<MODEL>, where <MODEL> is one of:
    stylegan3-t-ffhq-1024x1024.pkl, stylegan3-t-ffhqu-1024x1024.pkl, stylegan3-t-ffhqu-256x256.pkl
    stylegan3-r-ffhq-1024x1024.pkl, stylegan3-r-ffhqu-1024x1024.pkl, stylegan3-r-ffhqu-256x256.pkl
    stylegan3-t-metfaces-1024x1024.pkl, stylegan3-t-metfacesu-1024x1024.pkl
    stylegan3-r-metfaces-1024x1024.pkl, stylegan3-r-metfacesu-1024x1024.pkl
    stylegan3-t-afhqv2-512x512.pkl
    stylegan3-r-afhqv2-512x512.pkl

  • StyleGAN2 pre-trained models compatible with this codebase

    Access individual networks via https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan2/versions/1/files/<MODEL>, where <MODEL> is one of:
    stylegan2-ffhq-1024x1024.pkl, stylegan2-ffhq-512x512.pkl, stylegan2-ffhq-256x256.pkl
    stylegan2-ffhqu-1024x1024.pkl, stylegan2-ffhqu-256x256.pkl
    stylegan2-metfaces-1024x1024.pkl, stylegan2-metfacesu-1024x1024.pkl
    stylegan2-afhqv2-512x512.pkl
    stylegan2-afhqcat-512x512.pkl, stylegan2-afhqdog-512x512.pkl, stylegan2-afhqwild-512x512.pkl
    stylegan2-brecahad-512x512.pkl, stylegan2-cifar10-32x32.pkl
    stylegan2-celebahq-256x256.pkl, stylegan2-lsundog-256x256.pkl

Requirements

  • Linux and Windows are supported, but we recommend Linux for performance and compatibility reasons.
  • 1–8 high-end NVIDIA GPUs with at least 12 GB of memory. We have done all testing and development using Tesla V100 and A100 GPUs.
  • 64-bit Python 3.8 and PyTorch 1.9.0 (or later). See https://pytorch.org for PyTorch install instructions.
  • CUDA toolkit 11.1 or later. (Why is a separate CUDA toolkit installation required? See Troubleshooting).
  • GCC 7 or later (Linux) or Visual Studio (Windows) compilers. Recommended GCC version depends on CUDA version, see for example CUDA 11.4 system requirements.
  • Python libraries: see environment.yml for exact library dependencies. You can use the following commands with Miniconda3 to create and activate your StyleGAN3 Python environment:
    • conda env create -f environment.yml
    • conda activate stylegan3
  • Docker users:

The code relies heavily on custom PyTorch extensions that are compiled on the fly using NVCC. On Windows, the compilation requires Microsoft Visual Studio. We recommend installing Visual Studio Community Edition and adding it into PATH using "C:\Program Files (x86)\Microsoft Visual Studio\<VERSION>\Community\VC\Auxiliary\Build\vcvars64.bat".

See Troubleshooting for help on common installation and run-time problems.

Getting started

Pre-trained networks are stored as *.pkl files that can be referenced using local filenames or URLs:

# Generate an image using pre-trained AFHQv2 model ("Ours" in Figure 1, left).
python gen_images.py --outdir=out --trunc=1 --seeds=2 \
    --network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl

# Render a 4x2 grid of interpolations for seeds 0 through 31.
python gen_video.py --output=lerp.mp4 --trunc=1 --seeds=0-31 --grid=4x2 \
    --network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl

Outputs from the above commands are placed under out/*.png, controlled by --outdir. Downloaded network pickles are cached under $HOME/.cache/dnnlib, which can be overridden by setting the DNNLIB_CACHE_DIR environment variable. The default PyTorch extension build directory is $HOME/.cache/torch_extensions, which can be overridden by setting TORCH_EXTENSIONS_DIR.

Docker: You can run the above curated image example using Docker as follows:

# Build the stylegan3:latest image
docker build --tag stylegan3 .

# Run the gen_images.py script using Docker:
docker run --gpus all -it --rm --user $(id -u):$(id -g) \
    -v `pwd`:/scratch --workdir /scratch -e HOME=/scratch \
    stylegan3 \
    python gen_images.py --outdir=out --trunc=1 --seeds=2 \
         --network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl

Note: The Docker image requires NVIDIA driver release r470 or later.

The docker run invocation may look daunting, so let's unpack its contents here:

  • --gpus all -it --rm --user $(id -u):$(id -g): with all GPUs enabled, run an interactive session with current user's UID/GID to avoid Docker writing files as root.
  • -v `pwd`:/scratch --workdir /scratch: mount current running dir (e.g., the top of this git repo on your host machine) to /scratch in the container and use that as the current working dir.
  • -e HOME=/scratch: let PyTorch and StyleGAN3 code know where to cache temporary files such as pre-trained models and custom PyTorch extension build results. Note: if you want more fine-grained control, you can instead set TORCH_EXTENSIONS_DIR (for custom extensions build dir) and DNNLIB_CACHE_DIR (for pre-trained model download cache). You want these cache dirs to reside on persistent volumes so that their contents are retained across multiple docker run invocations.

Interactive visualization

This release contains an interactive model visualization tool that can be used to explore various characteristics of a trained model. To start it, run:

python visualizer.py

Visualizer screenshot

Using networks from Python

You can use pre-trained networks in your own Python code as follows:

with open('ffhq.pkl', 'rb') as f:
    G = pickle.load(f)['G_ema'].cuda()  # torch.nn.Module
z = torch.randn([1, G.z_dim]).cuda()    # latent codes
c = None                                # class labels (not used in this example)
img = G(z, c)                           # NCHW, float32, dynamic range [-1, +1], no truncation

The above code requires torch_utils and dnnlib to be accessible via PYTHONPATH. It does not need source code for the networks themselves — their class definitions are loaded from the pickle via torch_utils.persistence.

The pickle contains three networks. 'G' and 'D' are instantaneous snapshots taken during training, and 'G_ema' represents a moving average of the generator weights over several training steps. The networks are regular instances of torch.nn.Module, with all of their parameters and buffers placed on the CPU at import and gradient computation disabled by default.

The generator consists of two submodules, G.mapping and G.synthesis, that can be executed separately. They also support various additional options:

w = G.mapping(z, c, truncation_psi=0.5, truncation_cutoff=8)
img = G.synthesis(w, noise_mode='const', force_fp32=True)

Please refer to gen_images.py for complete code example.

Preparing datasets

Datasets are stored as uncompressed ZIP archives containing uncompressed PNG files and a metadata file dataset.json for labels. Custom datasets can be created from a folder containing images; see python dataset_tool.py --help for more information. Alternatively, the folder can also be used directly as a dataset, without running it through dataset_tool.py first, but doing so may lead to suboptimal performance.

FFHQ: Download the Flickr-Faces-HQ dataset as 1024x1024 images and create a zip archive using dataset_tool.py:

# Original 1024x1024 resolution.
python dataset_tool.py --source=/tmp/images1024x1024 --dest=~/datasets/ffhq-1024x1024.zip

# Scaled down 256x256 resolution.
python dataset_tool.py --source=/tmp/images1024x1024 --dest=~/datasets/ffhq-256x256.zip \
    --resolution=256x256

See the FFHQ README for information on how to obtain the unaligned FFHQ dataset images. Use the same steps as above to create a ZIP archive for training and validation.

MetFaces: Download the MetFaces dataset and create a ZIP archive:

python dataset_tool.py --source=~/downloads/metfaces/images --dest=~/datasets/metfaces-1024x1024.zip

See the MetFaces README for information on how to obtain the unaligned MetFaces dataset images. Use the same steps as above to create a ZIP archive for training and validation.

AFHQv2: Download the AFHQv2 dataset and create a ZIP archive:

python dataset_tool.py --source=~/downloads/afhqv2 --dest=~/datasets/afhqv2-512x512.zip

Note that the above command creates a single combined dataset using all images of all three classes (cats, dogs, and wild animals), matching the setup used in the StyleGAN3 paper. Alternatively, you can also create a separate dataset for each class:

python dataset_tool.py --source=~/downloads/afhqv2/train/cat --dest=~/datasets/afhqv2cat-512x512.zip
python dataset_tool.py --source=~/downloads/afhqv2/train/dog --dest=~/datasets/afhqv2dog-512x512.zip
python dataset_tool.py --source=~/downloads/afhqv2/train/wild --dest=~/datasets/afhqv2wild-512x512.zip

Training

You can train new networks using train.py. For example:

# Train StyleGAN3-T for AFHQv2 using 8 GPUs.
python train.py --outdir=~/training-runs --cfg=stylegan3-t --data=~/datasets/afhqv2-512x512.zip \
    --gpus=8 --batch=32 --gamma=8.2 --mirror=1

# Fine-tune StyleGAN3-R for MetFaces-U using 1 GPU, starting from the pre-trained FFHQ-U pickle.
python train.py --outdir=~/training-runs --cfg=stylegan3-r --data=~/datasets/metfacesu-1024x1024.zip \
    --gpus=8 --batch=32 --gamma=6.6 --mirror=1 --kimg=5000 --snap=5 \
    --resume=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-ffhqu-1024x1024.pkl

# Train StyleGAN2 for FFHQ at 1024x1024 resolution using 8 GPUs.
python train.py --outdir=~/training-runs --cfg=stylegan2 --data=~/datasets/ffhq-1024x1024.zip \
    --gpus=8 --batch=32 --gamma=10 --mirror=1 --aug=noaug

Note that the result quality and training time depend heavily on the exact set of options. The most important ones (--gpus, --batch, and --gamma) must be specified explicitly, and they should be selected with care. See python train.py --help for the full list of options and Training configurations for general guidelines & recommendations, along with the expected training speed & memory usage in different scenarios.

The results of each training run are saved to a newly created directory, for example ~/training-runs/00000-stylegan3-t-afhqv2-512x512-gpus8-batch32-gamma8.2. The training loop exports network pickles (network-snapshot-<KIMG>.pkl) and random image grids (fakes<KIMG>.png) at regular intervals (controlled by --snap). For each exported pickle, it evaluates FID (controlled by --metrics) and logs the result in metric-fid50k_full.jsonl. It also records various statistics in training_stats.jsonl, as well as *.tfevents if TensorBoard is installed.

Quality metrics

By default, train.py automatically computes FID for each network pickle exported during training. We recommend inspecting metric-fid50k_full.jsonl (or TensorBoard) at regular intervals to monitor the training progress. When desired, the automatic computation can be disabled with --metrics=none to speed up the training slightly.

Additional quality metrics can also be computed after the training:

# Previous training run: look up options automatically, save result to JSONL file.
python calc_metrics.py --metrics=eqt50k_int,eqr50k \
    --network=~/training-runs/00000-stylegan3-r-mydataset/network-snapshot-000000.pkl

# Pre-trained network pickle: specify dataset explicitly, print result to stdout.
python calc_metrics.py --metrics=fid50k_full --data=~/datasets/ffhq-1024x1024.zip --mirror=1 \
    --network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-t-ffhq-1024x1024.pkl

The first example looks up the training configuration and performs the same operation as if --metrics=eqt50k_int,eqr50k had been specified during training. The second example downloads a pre-trained network pickle, in which case the values of --data and --mirror must be specified explicitly.

Note that the metrics can be quite expensive to compute (up to 1h), and many of them have an additional one-off cost for each new dataset (up to 30min). Also note that the evaluation is done using a different random seed each time, so the results will vary if the same metric is computed multiple times.

Recommended metrics:

  • fid50k_full: Fréchet inception distance[1] against the full dataset.
  • kid50k_full: Kernel inception distance[2] against the full dataset.
  • pr50k3_full: Precision and recall[3] againt the full dataset.
  • ppl2_wend: Perceptual path length[4] in W, endpoints, full image.
  • eqt50k_int: Equivariance[5] w.r.t. integer translation (EQ-T).
  • eqt50k_frac: Equivariance w.r.t. fractional translation (EQ-Tfrac).
  • eqr50k: Equivariance w.r.t. rotation (EQ-R).

Legacy metrics:

  • fid50k: Fréchet inception distance against 50k real images.
  • kid50k: Kernel inception distance against 50k real images.
  • pr50k3: Precision and recall against 50k real images.
  • is50k: Inception score[6] for CIFAR-10.

References:

  1. GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium, Heusel et al. 2017
  2. Demystifying MMD GANs, Bińkowski et al. 2018
  3. Improved Precision and Recall Metric for Assessing Generative Models, Kynkäänniemi et al. 2019
  4. A Style-Based Generator Architecture for Generative Adversarial Networks, Karras et al. 2018
  5. Alias-Free Generative Adversarial Networks, Karras et al. 2021
  6. Improved Techniques for Training GANs, Salimans et al. 2016

Spectral analysis

The easiest way to inspect the spectral properties of a given generator is to use the built-in FFT mode in visualizer.py. In addition, you can visualize average 2D power spectra (Appendix A, Figure 15) as follows:

# Calculate dataset mean and std, needed in subsequent steps.
python avg_spectra.py stats --source=~/datasets/ffhq-1024x1024.zip

# Calculate average spectrum for the training data.
python avg_spectra.py calc --source=~/datasets/ffhq-1024x1024.zip \
    --dest=tmp/training-data.npz --mean=112.684 --std=69.509

# Calculate average spectrum for a pre-trained generator.
python avg_spectra.py calc \
    --source=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-ffhq-1024x1024.pkl \
    --dest=tmp/stylegan3-r.npz --mean=112.684 --std=69.509 --num=70000

# Display results.
python avg_spectra.py heatmap tmp/training-data.npz
python avg_spectra.py heatmap tmp/stylegan3-r.npz
python avg_spectra.py slices tmp/training-data.npz tmp/stylegan3-r.npz

Average spectra screenshot

License

Copyright © 2021, NVIDIA Corporation & affiliates. All rights reserved.

This work is made available under the Nvidia Source Code License.

Citation

@inproceedings{Karras2021,
  author = {Tero Karras and Miika Aittala and Samuli Laine and Erik H\"ark\"onen and Janne Hellsten and Jaakko Lehtinen and Timo Aila},
  title = {Alias-Free Generative Adversarial Networks},
  booktitle = {Proc. NeurIPS},
  year = {2021}
}

Development

This is a research reference implementation and is treated as a one-time code drop. As such, we do not accept outside code contributions in the form of pull requests.

Acknowledgements

We thank David Luebke, Ming-Yu Liu, Koki Nagano, Tuomas Kynkäänniemi, and Timo Viitanen for reviewing early drafts and helpful suggestions. Frédo Durand for early discussions. Tero Kuosmanen for maintaining our compute infrastructure. AFHQ authors for an updated version of their dataset. Getty Images for the training images in the Beaches dataset. We did not receive external funding or additional revenues for this project.

stylegan3's People

Contributors

jannehellsten avatar nurpax avatar tkarras avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stylegan3's Issues

visualization.py cp949 codec error

Describe the bug

Traceback (most recent call last):
  File "C:\Users\82109\Desktop\stylegan3\viz\renderer.py", line 136, in render
    self._render_impl(res, **args)
  File "C:\Users\82109\Desktop\stylegan3\viz\renderer.py", line 278, in _render_impl
    all_ws = G.mapping(z=all_zs, c=all_cs, truncation_psi=trunc_psi, truncation_cutoff=trunc_cutoff) - w_avg
  File "C:\Users\82109\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "<string>", line 238, in forward
  File "C:\Users\82109\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "<string>", line 116, in forward
  File "C:\Users\82109\Desktop\stylegan3\torch_utils\ops\bias_act.py", line 84, in bias_act
    if impl == 'cuda' and x.device.type == 'cuda' and _init():
  File "C:\Users\82109\Desktop\stylegan3\torch_utils\ops\bias_act.py", line 46, in _init
    extra_cuda_cflags=['--use_fast_math'],
  File "C:\Users\82109\Desktop\stylegan3\torch_utils\custom_ops.py", line 137, in get_plugin
    verbose=verbose_build, sources=cached_sources, **build_kwargs)
  File "C:\Users\82109\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\cpp_extension.py", line 1091, in load
    keep_intermediates=keep_intermediates)
  File "C:\Users\82109\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\cpp_extension.py", line 1269, in _jit_compile
    is_standalone=is_standalone,
  File "C:\Users\82109\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\_cpp_extension_versioner.py", line 16, in hash_source_files
    hash_value = update_hash(hash_value, file.read())
UnicodeDecodeError: 'cp949' codec can't decode byte 0xbf in position 2: illegal multibyte sequence

To Reproduce
Steps to reproduce the behavior:

  1. Run visualization.py
  2. click recent
  3. any pickle download
  4. show this error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
캡처

Desktop (please complete the following information):

  • OS: [Windows 10]
  • torch 1.8.1+cu111
  • GPU [RTX 3090]

Is there a method or way to optimize stylegan3?

This might be not really the clearest question, but imagine if I gave stylegan3 10K images of minecraft, 512x512 trained on a T4 - 2188 sec/tick (stylegan2-ada-pytorch) or P100 - 1819 sec/tick (stylegan2-ada-pytorch) on just the default settings ment for this kind of training.
Is there a way to make it go faster? Is Stylegan3 faster than Stylegan2-ada-pytorch?

I know this might be a silly question to ask, I'm just not that experienced in data science, I just do stuff.

ninja: build stopped: subcommand failed.

Dear Authors,

I get the following errors when running the code using the stylegan3-t config:

Setting up PyTorch plugin "filtered_lrelu_plugin"... Failed!
Traceback (most recent call last):
  File "/cluster/home/user/development/lib64/python3.8/site-packages/torch/utils/cpp_extension.py", line 1666, in _run_ninja_build
    subprocess.run(
  File "/cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/lib64/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "train.py", line 286, in <module>
    main() # pylint: disable=no-value-for-parameter
  File "/cluster/home/user/development/lib64/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/cluster/home/user/development/lib64/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/cluster/home/user/development/lib64/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/cluster/home/user/development/lib64/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "train.py", line 281, in main
    launch_training(c=c, desc=desc, outdir=opts.outdir, dry_run=opts.dry_run)
  File "train.py", line 96, in launch_training
    subprocess_fn(rank=0, c=c, temp_dir=temp_dir)
  File "train.py", line 47, in subprocess_fn
    training_loop.training_loop(rank=rank, **c)
  File "/cluster/home/user/gan/stylegan3/training/training_loop.py", line 168, in training_loop
    img = misc.print_module_summary(G, [z, c])
  File "/cluster/home/user/gan/stylegan3/torch_utils/misc.py", line 216, in print_module_summary
    outputs = module(*inputs)
  File "/cluster/home/user/development/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1071, in _call_impl
    result = forward_call(*input, **kwargs)
  File "/cluster/home/user/gan/stylegan3/training/networks_stylegan3.py", line 512, in forward
    img = self.synthesis(ws, update_emas=update_emas, **synthesis_kwargs)
  File "/cluster/home/user/development/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1071, in _call_impl
    result = forward_call(*input, **kwargs)
  File "/cluster/home/user/gan/stylegan3/training/networks_stylegan3.py", line 471, in forward
    x = getattr(self, name)(x, w, **layer_kwargs)
  File "/cluster/home/user/development/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1071, in _call_impl
    result = forward_call(*input, **kwargs)
  File "/cluster/home/user/gan/stylegan3/training/networks_stylegan3.py", line 355, in forward
    x = filtered_lrelu.filtered_lrelu(x=x, fu=self.up_filter, fd=self.down_filter, b=self.bias.to(x.dtype),
  File "/cluster/home/user/gan/stylegan3/torch_utils/ops/filtered_lrelu.py", line 114, in filtered_lrelu
    if impl == 'cuda' and x.device.type == 'cuda' and _init():
  File "/cluster/home/user/gan/stylegan3/torch_utils/ops/filtered_lrelu.py", line 26, in _init
    _plugin = custom_ops.get_plugin(
  File "/cluster/home/user/gan/stylegan3/torch_utils/custom_ops.py", line 136, in get_plugin
    torch.utils.cpp_extension.load(name=module_name, build_directory=cached_build_dir,
  File "/cluster/home/user/development/lib64/python3.8/site-packages/torch/utils/cpp_extension.py", line 1080, in load
    return _jit_compile(
  File "/cluster/home/user/development/lib64/python3.8/site-packages/torch/utils/cpp_extension.py", line 1293, in _jit_compile
    _write_ninja_file_and_build_library(
  File "/cluster/home/user/development/lib64/python3.8/site-packages/torch/utils/cpp_extension.py", line 1405, in _write_ninja_file_and_build_library
    _run_ninja_build(
  File "/cluster/home/user/development/lib64/python3.8/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error building extension 'filtered_lrelu_plugin': [1/5] /cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-6.3.0-sqhtfh32p5gerbkvi5hih7cfvcpmewvj/bin/g++ -MMD -MF filtered_lrelu.o.d -DTORCH_EXTENSION_NAME=filtered_lrelu_plugin -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/TH -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/THC -isystem /cluster/apps/gcc-6.3.0/cuda-11.1.1-s2fmzfqahrfvezvmg4tslqqedhl3bggv/include -isystem /cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c /cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu.cpp -o filtered_lrelu.o 
FAILED: filtered_lrelu.o 
/cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-6.3.0-sqhtfh32p5gerbkvi5hih7cfvcpmewvj/bin/g++ -MMD -MF filtered_lrelu.o.d -DTORCH_EXTENSION_NAME=filtered_lrelu_plugin -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/TH -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/THC -isystem /cluster/apps/gcc-6.3.0/cuda-11.1.1-s2fmzfqahrfvezvmg4tslqqedhl3bggv/include -isystem /cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c /cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu.cpp -o filtered_lrelu.o 
In file included from /cluster/home/user/development/lib/python3.8/site-packages/torch/include/ATen/ATen.h:13:0,
                 from /cluster/home/user/development/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /cluster/home/user/development/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /cluster/home/user/development/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /cluster/home/user/development/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /cluster/home/user/development/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /cluster/home/user/development/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /cluster/home/user/development/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
                 from /cluster/home/user/development/lib/python3.8/site-packages/torch/include/torch/extension.h:4,
                 from /cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu.cpp:9:
/cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu.cpp: In lambda function:
/cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu.cpp:149:12: error: expected ‘(’ before ‘constexpr’
         if constexpr (sizeof(scalar_t) <= 4) // Exclude doubles. constexpr prevents template instantiation.
            ^
/cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu.cpp: In lambda function:
/cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu.cpp:149:12: error: expected ‘(’ before ‘constexpr’
         if constexpr (sizeof(scalar_t) <= 4) // Exclude doubles. constexpr prevents template instantiation.
            ^
/cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu.cpp: In lambda function:
/cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu.cpp:149:12: error: expected ‘(’ before ‘constexpr’
         if constexpr (sizeof(scalar_t) <= 4) // Exclude doubles. constexpr prevents template instantiation.
            ^
[2/5] /cluster/apps/gcc-6.3.0/cuda-11.1.1-s2fmzfqahrfvezvmg4tslqqedhl3bggv/bin/nvcc  -ccbin /cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-6.3.0-sqhtfh32p5gerbkvi5hih7cfvcpmewvj/bin/gcc -DTORCH_EXTENSION_NAME=filtered_lrelu_plugin -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/TH -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/THC -isystem /cluster/apps/gcc-6.3.0/cuda-11.1.1-s2fmzfqahrfvezvmg4tslqqedhl3bggv/include -isystem /cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' --use_fast_math -std=c++14 -c /cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu_ns.cu -o filtered_lrelu_ns.cuda.o 
[3/5] /cluster/apps/gcc-6.3.0/cuda-11.1.1-s2fmzfqahrfvezvmg4tslqqedhl3bggv/bin/nvcc  -ccbin /cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-6.3.0-sqhtfh32p5gerbkvi5hih7cfvcpmewvj/bin/gcc -DTORCH_EXTENSION_NAME=filtered_lrelu_plugin -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/TH -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/THC -isystem /cluster/apps/gcc-6.3.0/cuda-11.1.1-s2fmzfqahrfvezvmg4tslqqedhl3bggv/include -isystem /cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' --use_fast_math -std=c++14 -c /cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu_rd.cu -o filtered_lrelu_rd.cuda.o 
[4/5] /cluster/apps/gcc-6.3.0/cuda-11.1.1-s2fmzfqahrfvezvmg4tslqqedhl3bggv/bin/nvcc  -ccbin /cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-6.3.0-sqhtfh32p5gerbkvi5hih7cfvcpmewvj/bin/gcc -DTORCH_EXTENSION_NAME=filtered_lrelu_plugin -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/TH -isystem /cluster/home/user/development/lib64/python3.8/site-packages/torch/include/THC -isystem /cluster/apps/gcc-6.3.0/cuda-11.1.1-s2fmzfqahrfvezvmg4tslqqedhl3bggv/include -isystem /cluster/apps/nss/gcc-6.3.0/python/3.8.5/x86_64/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' --use_fast_math -std=c++14 -c /cluster/home/user/.cache/torch_extensions/filtered_lrelu_plugin/0c8207121140d174807b17c24d32b436-tesla-v100-sxm2-32gb/filtered_lrelu_wr.cu -o filtered_lrelu_wr.cuda.o 
ninja: build stopped: subcommand failed.

The exact command that I'm using is:

python train.py --outdir=./training-runs --data=$WORKDIR/data.zip --cfg=stylegan3-t --gpus=2 --batch=32 --gamma=8.2

System Details:

  • OS: CentOS Linux release 7.9.2009
  • PyTorch version: 1.9.1
  • CUDA toolkit version: 11.1.1
  • NVIDIA driver version: 450.80.02
  • GPU: V100
  • GCC version: 6.3

Thank you for your help in advance.

Issue with StyleGan2 .pkl File + gen_images.py

I'm encountering an error while attempting to generate images from a StyleGan2 .pkl file.

Here is the full command and error printout:

(stylegan3) C:\Users\Mars\Documents\stylegan3>python gen_images.py --network "./TADNE-512.pkl" --seeds "1-10" --outdir "./TADNE-Images/"
Loading networks from "./TADNE-512.pkl"...
No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0'
Traceback (most recent call last):
  File "C:\Users\Mars\Documents\stylegan3\gen_images.py", line 143, in <module>
    generate_images() # pylint: disable=no-value-for-parameter
  File "C:\Users\Mars\miniconda3\envs\stylegan3\lib\site-packages\click\core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Mars\miniconda3\envs\stylegan3\lib\site-packages\click\core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "C:\Users\Mars\miniconda3\envs\stylegan3\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Mars\miniconda3\envs\stylegan3\lib\site-packages\click\core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\Mars\Documents\stylegan3\gen_images.py", line 108, in generate_images
    G = legacy.load_network_pkl(f)['G_ema'].to(device) # type: ignore
  File "C:\Users\Mars\Documents\stylegan3\legacy.py", line 28, in load_network_pkl
    G = convert_tf_generator(tf_G)
  File "C:\Users\Mars\Documents\stylegan3\legacy.py", line 155, in convert_tf_generator
    raise ValueError('Unknown TensorFlow kwarg', unknown_kwargs[0])
ValueError: ('Unknown TensorFlow kwarg', 'resolution_w')

I'm running miniconda 4.8.3 on Windows 10 19043.1288. Since I'm not training, I decided to poke around with some basic image generation using my GTX 1650. I'm on driver version 451.67 and CUDA toolkit version 11.3.1. I'm using the versions of packages that are specified in the enviornment.yml file, aside from a few that didn't cooperate (or ones that weren't included).

For reference, here's a list of the packages I have currently installed in this environment:

brotlipy           0.7.0
certifi            2021.10.8
cffi               1.14.6
charset-normalizer 2.0.4
click              8.0.1
clip               1.0
colorama           0.4.4
cryptography       3.4.8
cycler             0.10.0
einops             0.3.2
fonttools          4.25.0
ftfy               6.0.3
glfw               2.2.0
idna               3.2
imageio            2.9.0
imageio-ffmpeg     0.4.3
imgui              1.3.0
importlib-metadata 4.8.1
kiwisolver         1.3.1
matplotlib         3.4.2
mkl-fft            1.3.1
mkl-random         1.2.2
mkl-service        2.4.0
munkres            1.1.4
numpy              1.21.2
olefile            0.46
Pillow             8.3.1
pip                21.2.4
psutil             5.8.0
pycparser          2.20
PyOpenGL           3.1.5
pyOpenSSL          20.0.1
pyparsing          2.4.7
PySocks            1.7.1
pyspng             0.1.0
python-dateutil    2.8.2
regex              2021.10.23
requests           2.26.0
scipy              1.7.1
setuptools         58.0.4
sip                4.19.13
six                1.16.0
torch              1.10.0
torchvision        0.11.1
tornado            6.1
tqdm               4.62.2
typing-extensions  3.10.0.2
urllib3            1.26.7
wcwidth            0.2.5
wheel              0.37.0
win-inet-pton      1.1.0
wincertstore       0.2
zipp               3.6.0

I can see from the printout that it's trying to load the pickle file using the proper legacy functions, although for some reason a ValueError is creeping in. While that's self-evident, I have no clue why this would be happening. In my experience, a limited amount of something like VRAM would throw its respective memory error. Since this is in the TF .pkl (and not PyTorch) format, it should be ready to go in that department. Oh, and I just realized the weird CUDA runtime issue at the top. Running conda list cudatoolkit returns 11.3.1, which means it's not finding the CUDA runtime inside of the conda environment? I'm not sure. Any help is appreciated.

filtered_lrelu_plugin problem

At first I got:

filtered_lrelu.cpp(147): error C4984: 'if constexpr' is a C++17 language extension

It's from this line:

if constexpr (sizeof(scalar_t) <= 4)

sizeof scalar_t is either less/equal 4, or greater than 4, so I tried to remove this condition sentence.

But then I got:

filtered_lrelu_plugin.pyd : fatal error LNK1120: 6 unresolved externals

There are 6 unresolved symbols about template function 'choose_filtered_lrelu_kernel'. Maybe scalar_t is greater than 4, so I removed all the code referencing 'choose_filtered_lrelu_kernel'.

But then I failed at this line:

filtered_lrelu.cpp(160)

TORCH_CHECK(spec.exec, "internal error - CUDA kernel not found") // This should not happen because we tested earlier that kernel exists.

My environment is Windows 10, python 3.8, CUDA 11.1 (cudnn-11.1-windows-x64-v8.0.5.39), torch 1.9.0.

mod pre normalize is different, and is there some wrong?

in style2gan-ada,the pre normal is like(file training/networks_stylegan2.py, line 52):

    if x.dtype == torch.float16 and demodulate:

         weight = weight * (1 / np.sqrt(in_channels * kh * kw) / weight.norm(float('inf'), dim=[1,2,3], keepdim=True)) # max_Ikk

         styles = styles / styles.norm(float('inf'), dim=1, keepdim=True) # max_I

`

pay attention to the styles, it's normalized per batch

but for style3gan(file training/networks_stylegan3.py, line 42), it's change to:

 if demodulate:

      w = w * w.square().mean([1,2,3], keepdim=True).rsqrt()

      s = s * s.square().mean().rsqrt()

the styles is normalized by all, is there realized right ?

stuck on evaluating metrics

Began training a new GAN last night on a dataset of 512x512 images, and after letting it run overnight I still do not have the 'tick 1' benchmark. I did notice in the readme that it would take a while if only training on 1 GPU (i am training on a single 3090), but 14+ hours before the first benchmark seems long. Do I need to reset my training parameters and start over? (gpus=1, batch=32, gamma=8, batch-gpu=8, snap=5)

runerror: model don't match with net

Describe the bug
load the *.pkl don't match the model

To Reproduce
Steps to reproduce the behavior:

  1. python train.py --outdir=~/training-runs --cfg=stylegan3-t --data={dir}.zip
    --gpus=1 --batch=32 --gamma=6.6 --mirror=1 --kimg=5000 --snap=5
    --resume={dir}/stylegan3-t-ffhqu-256x256.pkl
  2. RuntimeError: The size of tensor a (128) must match the size of tensor b (64) at non-singleton dimension 1

`AssertionError: Generator.synthesis.input.weight` when attempting to train with class labels

Describe the bug
When attempting to train a new model with class labels (0, 1, ... 8, 9), using the same format as shown in dataset_tool.py --help, an assertion error is raised by check_ddp_consistency

When the class labels for the dataset were replaced with one-hot encodings, the model trained without issue.

To Reproduce
Steps to reproduce the behavior:

  1. In '...' directory, run command '...'
    Create a dataset with 10 different class labels, 0...9 (e.g.: ilsvrc2012-subset10-128x128.zip), in the same structure as referenced by dataset_tool.py --help
python train.py --outdir=/media/disk2/stylegan-training-runs --cfg=stylegan3-r --gpus=2 --batch=32 --gamma=0.5 \
    --snap=1 --data=/media/disk2/ImageNet2012/ilsvrc2012-subset10-128x128.zip --kimg=20 --mirror=1 \
    --cond True --metrics=none
  1. See error (copy&paste full log, including exceptions and stacktraces).
    Please copy&paste text instead of screenshots for better searchability.
Training options:
{
  "G_kwargs": {
    "class_name": "training.networks_stylegan3.Generator",
    "z_dim": 512,
    "w_dim": 512,
    "mapping_kwargs": {
      "num_layers": 2
    },
    "channel_base": 65536,
    "channel_max": 1024,
    "magnitude_ema_beta": 0.9988915792636801,
    "conv_kernel": 1,
    "use_radial_filters": true
  },
  "D_kwargs": {
    "class_name": "training.networks_stylegan2.Discriminator",
    "block_kwargs": {
      "freeze_layers": 0
    },
    "mapping_kwargs": {},
    "epilogue_kwargs": {
      "mbstd_group_size": 4
    },
    "channel_base": 32768,
    "channel_max": 512
  },
  "G_opt_kwargs": {
    "class_name": "torch.optim.Adam",
    "betas": [
      0,
      0.99
    ],
    "eps": 1e-08,
    "lr": 0.0025
  },
  "D_opt_kwargs": {
    "class_name": "torch.optim.Adam",
    "betas": [
      0,
      0.99
    ],
    "eps": 1e-08,
    "lr": 0.002
  },
  "loss_kwargs": {
    "class_name": "training.loss.StyleGAN2Loss",
    "r1_gamma": 0.5,
    "blur_init_sigma": 10,
    "blur_fade_kimg": 200.0
  },
  "data_loader_kwargs": {
    "pin_memory": true,
    "prefetch_factor": 2,
    "num_workers": 3
  },
  "training_set_kwargs": {
    "class_name": "training.dataset.ImageFolderDataset",
    "path": "/media/disk2/ImageNet2012/ilsvrc2012-subset10-128x128.zip",
    "use_labels": true,
    "max_size": 13000,
    "xflip": true,
    "resolution": 128,
    "random_seed": 0
  },
  "num_gpus": 2,
  "batch_size": 32,
  "batch_gpu": 16,
  "metrics": [],
  "total_kimg": 20,
  "kimg_per_tick": 4,
  "image_snapshot_ticks": 1,
  "network_snapshot_ticks": 1,
  "random_seed": 0,
  "ema_kimg": 10.0,
  "augment_kwargs": {
    "class_name": "training.augment.AugmentPipe",
    "xflip": 1,
    "rotate90": 1,
    "xint": 1,
    "scale": 1,
    "rotate": 1,
    "aniso": 1,
    "xfrac": 1,
    "brightness": 1,
    "contrast": 1,
    "lumaflip": 1,
    "hue": 1,
    "saturation": 1
  },
  "ada_target": 0.6,
  "run_dir": "/media/disk2/stylegan-training-runs/00004-stylegan3-r-ilsvrc2012-subset10-128x128-gpus2-batch32-gamma0.5"
}

Output directory:    /media/disk2/stylegan-training-runs/00004-stylegan3-r-ilsvrc2012-subset10-128x128-gpus2-batch32-gamma0.5
Number of GPUs:      2
Batch size:          32 images
Training duration:   20 kimg
Dataset path:        /media/disk2/ImageNet2012/ilsvrc2012-subset10-128x128.zip
Dataset size:        13000 images
Dataset resolution:  128
Dataset labels:      True
Dataset x-flips:     True

Creating output directory...
Launching processes...
Loading training set...

Num images:  26000
Image shape: [3, 128, 128]
Label shape: [10]

Constructing networks...
Setting up PyTorch plugin "bias_act_plugin"... Done.
Setting up PyTorch plugin "filtered_lrelu_plugin"... Done.

Generator                     Parameters  Buffers  Output shape          Datatype
---                           ---         ---      ---                   ---     
mapping.embed                 5632        -        [16, 512]             float32 
mapping.fc0                   524800      -        [16, 512]             float32 
mapping.fc1                   262656      -        [16, 512]             float32 
mapping                       -           512      [16, 16, 512]         float32 
synthesis.input.affine        2052        -        [16, 4]               float32 
synthesis.input               1048576     3081     [16, 1024, 36, 36]    float32 
synthesis.L0_36_1024.affine   525312      -        [16, 1024]            float32 
synthesis.L0_36_1024          1049600     157      [16, 1024, 36, 36]    float16 
synthesis.L1_36_1024.affine   525312      -        [16, 1024]            float32 
synthesis.L1_36_1024          1049600     157      [16, 1024, 36, 36]    float16 
synthesis.L2_36_1024.affine   525312      -        [16, 1024]            float32 
synthesis.L2_36_1024          1049600     157      [16, 1024, 36, 36]    float16 
synthesis.L3_52_1024.affine   525312      -        [16, 1024]            float32 
synthesis.L3_52_1024          1049600     169      [16, 1024, 52, 52]    float16 
synthesis.L4_52_1024.affine   525312      -        [16, 1024]            float32 
synthesis.L4_52_1024          1049600     157      [16, 1024, 52, 52]    float16 
synthesis.L5_52_1024.affine   525312      -        [16, 1024]            float32 
synthesis.L5_52_1024          1049600     157      [16, 1024, 52, 52]    float16 
synthesis.L6_84_1024.affine   525312      -        [16, 1024]            float32 
synthesis.L6_84_1024          1049600     169      [16, 1024, 84, 84]    float16 
synthesis.L7_84_1024.affine   525312      -        [16, 1024]            float32 
synthesis.L7_84_1024          1049600     157      [16, 1024, 84, 84]    float16 
synthesis.L8_84_1024.affine   525312      -        [16, 1024]            float32 
synthesis.L8_84_1024          1049600     157      [16, 1024, 84, 84]    float16 
synthesis.L9_148_1024.affine  525312      -        [16, 1024]            float32 
synthesis.L9_148_1024         1049600     169      [16, 1024, 148, 148]  float16 
synthesis.L10_148_912.affine  525312      -        [16, 1024]            float32 
synthesis.L10_148_912         934800      157      [16, 912, 148, 148]   float16 
synthesis.L11_148_683.affine  467856      -        [16, 912]             float32 
synthesis.L11_148_683         623579      157      [16, 683, 148, 148]   float16 
synthesis.L12_148_512.affine  350379      -        [16, 683]             float32 
synthesis.L12_148_512         350208      25       [16, 512, 148, 148]   float16 
synthesis.L13_128_512.affine  262656      -        [16, 512]             float32 
synthesis.L13_128_512         262656      25       [16, 512, 128, 128]   float16 
synthesis.L14_128_3.affine    262656      -        [16, 512]             float32 
synthesis.L14_128_3           1539        1        [16, 3, 128, 128]     float16 
synthesis                     -           -        [16, 3, 128, 128]     float32 
---                           ---         ---      ---                   ---     
Total                         21634477    5564     -                     -       

Setting up PyTorch plugin "upfirdn2d_plugin"... Done.

Discriminator  Parameters  Buffers  Output shape         Datatype
---            ---         ---      ---                  ---     
b128.fromrgb   1024        16       [16, 256, 128, 128]  float16 
b128.skip      131072      16       [16, 512, 64, 64]    float16 
b128.conv0     590080      16       [16, 256, 128, 128]  float16 
b128.conv1     1180160     16       [16, 512, 64, 64]    float16 
b128           -           16       [16, 512, 64, 64]    float16 
b64.skip       262144      16       [16, 512, 32, 32]    float16 
b64.conv0      2359808     16       [16, 512, 64, 64]    float16 
b64.conv1      2359808     16       [16, 512, 32, 32]    float16 
b64            -           16       [16, 512, 32, 32]    float16 
b32.skip       262144      16       [16, 512, 16, 16]    float16 
b32.conv0      2359808     16       [16, 512, 32, 32]    float16 
b32.conv1      2359808     16       [16, 512, 16, 16]    float16 
b32            -           16       [16, 512, 16, 16]    float16 
b16.skip       262144      16       [16, 512, 8, 8]      float16 
b16.conv0      2359808     16       [16, 512, 16, 16]    float16 
b16.conv1      2359808     16       [16, 512, 8, 8]      float16 
b16            -           16       [16, 512, 8, 8]      float16 
b8.skip        262144      16       [16, 512, 4, 4]      float32 
b8.conv0       2359808     16       [16, 512, 8, 8]      float32 
b8.conv1       2359808     16       [16, 512, 4, 4]      float32 
b8             -           16       [16, 512, 4, 4]      float32 
mapping.embed  5632        -        [16, 512]            float32 
mapping.fc0    262656      -        [16, 512]            float32 
mapping.fc1    262656      -        [16, 512]            float32 
mapping.fc2    262656      -        [16, 512]            float32 
mapping.fc3    262656      -        [16, 512]            float32 
mapping.fc4    262656      -        [16, 512]            float32 
mapping.fc5    262656      -        [16, 512]            float32 
mapping.fc6    262656      -        [16, 512]            float32 
mapping.fc7    262656      -        [16, 512]            float32 
b4.mbstd       -           -        [16, 513, 4, 4]      float32 
b4.conv        2364416     16       [16, 512, 4, 4]      float32 
b4.fc          4194816     -        [16, 512]            float32 
b4.out         262656      -        [16, 512]            float32 
b4             -           -        [16, 1]              float32 
---            ---         ---      ---                  ---     
Total          30758144    352      -                    -       

Setting up augmentation...
Distributing across 2 GPUs...
Setting up training phases...
Exporting sample images...
Initializing logs...
Training for 20 kimg...

tick 0     kimg 0.0      time 36s          sec/tick 6.4     sec/kimg 198.55  maintenance 29.2   cpumem 5.30   gpumem 34.87  reserved 40.09  augment 0.000
Traceback (most recent call last):
  File "train.py", line 286, in <module>
    main() # pylint: disable=no-value-for-parameter
  File "/home/jeremy/Documents/stylegan3/.venv/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/jeremy/Documents/stylegan3/.venv/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/jeremy/Documents/stylegan3/.venv/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/jeremy/Documents/stylegan3/.venv/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "train.py", line 281, in main
    launch_training(c=c, desc=desc, outdir=opts.outdir, dry_run=opts.dry_run)
  File "train.py", line 98, in launch_training
    torch.multiprocessing.spawn(fn=subprocess_fn, args=(c, temp_dir), nprocs=c.num_gpus)
  File "/home/jeremy/Documents/stylegan3/.venv/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 230, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "/home/jeremy/Documents/stylegan3/.venv/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 188, in start_processes
    while not context.join():
  File "/home/jeremy/Documents/stylegan3/.venv/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 150, in join
    raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException: 

-- Process 1 terminated with the following error:
Traceback (most recent call last):
  File "/home/jeremy/Documents/stylegan3/.venv/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 59, in _wrap
    fn(i, *args)
  File "/home/jeremy/Documents/stylegan3/train.py", line 47, in subprocess_fn
    training_loop.training_loop(rank=rank, **c)
  File "/home/jeremy/Documents/stylegan3/training/training_loop.py", line 365, in training_loop
    misc.check_ddp_consistency(module, ignore_regex=r'.*\.[^.]+_(avg|ema)')
  File "/home/jeremy/Documents/stylegan3/torch_utils/misc.py", line 191, in check_ddp_consistency
    assert (tensor == other).all(), fullname
AssertionError: Generator.synthesis.input.weight

Expected behavior
Both the class labels and the one-hot encoded labels show Label shape: [10] and identical network structure, and both should be expected to train without error

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • PyTorch version: 1.9.1+cu111
  • CUDA toolkit version: CUDA 11.1
  • NVIDIA driver version: 460.91.03
  • GPU: 2 x RTX A6000
  • Docker: did you use Docker? No

Additional context
Add any other context about the problem here.

Does stylegan3 augment the dataset.

I saw in the readme.md file that it was an updated version of stylegan2-ada. But this repo isn't called stylegan3-ada, it's called stylegan3. Is there an option to turn on data augmentation or is it just not there?

about augmentation ?

I got only about 10000 512x512 landform image for training, so I use --aug=ada. is it reasonable for augment=0.02x from the tick info ? And I wonder what's that mean about augment ?
Screenshot_select-area_20211021115425

Appreciated.

Cannot re-initialize CUDA in forked subprocess.

Describe the bug
Enabling Separate process in the visualizer rendering settings currently results in runtime error.

To Reproduce

  1. Run visualizer.py
  2. Load model
  3. Enable Separate process in the renderer settings

Expected behavior
I assume this would spawn a different process and use it for rendering only

Traceback

Traceback (most recent call last):
  File "/home/x/miniconda3/envs/stylegan3/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/home/x/miniconda3/envs/stylegan3/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/x/Development/stylegan3/visualizer.py", line 264, in _process_fn
    result = renderer_obj.render(**args)
  File "/home/x/Development/stylegan3/viz/renderer.py", line 133, in render
    self._start_event.record(torch.cuda.current_stream(self._device))
  File "/home/x/miniconda3/envs/stylegan3/lib/python3.9/site-packages/torch/cuda/__init__.py", line 471, in current_stream
    _lazy_init()
  File "/home/x/miniconda3/envs/stylegan3/lib/python3.9/site-packages/torch/cuda/__init__.py", line 162, in _lazy_init
    raise RuntimeError(
RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method

Desktop (please complete the following information):

  • OS: Linux Ubuntu 20.04
  • PyTorch version: pytorch 1.9.1
  • CUDA toolkit version: CUDA 11.5
  • NVIDIA driver version: 495.29.05
  • GPU: RTX 3090
  • Docker: Nope

Any plans on releasing the pretrained model on the beaches dataset?

Hi,
I was impressed by the model mimicing the camera movements when trained on the Beaches dataset,
and it seems the only pretrained model weights available now are ffhq, afhq, and metfaces.
Is there any future plans involving releasing the model weights for the Beaches dataset?

Thanks.

Can we get more useful pretrained models?

I'm all out of spare $40k ML rigs and colab pro is going to take months to train this. A lot of us simply don't have the money to train this from scratch.

With the chip shortage making this particularly tough, is it out of the question that we will see something other than just pretrained face models? The only way for us plebs to really use any of this code is to transfer learn onto it at the moment or wait on a handful of benevolent randos to share a model. Adjusting when retraining from scratch isn't viable without an unreasonably expensive piece of hardware (at the moment at least).

A full body model trained on humanoid characters or photos, a landscape model, a generic art model--any of those would be more creatively useful than cat pic and portrait models. I really want to dig in to StyleGAN3 and explore what it can do but I'm struggling to transfer learn anything other than faces onto it. Portrait models aren't working for transferring anything other than other portraits (expected but I at least wanted to try).

Only recently have gotten into StyleGAN, maybe I'll be able to use it in a couple years..

training crashed

After some time training got crashed by some unexpected behavior. I've tried with batch size 24 and 48 on 3 gpus.

Evaluating metrics...
{"results": {"fid50k_full": 10.638274366895118}, "metric": "fid50k_full", "total_time": 491.9900858402252, "total_time_str": "8m 12s", "num_gpus": 3, "snapshot_pkl": "network-snapshot-000000.pkl", "timestamp": 1634026244.8660324}
tick 1     kimg 4.0      time 13m 32s      sec/tick 224.1   sec/kimg 55.93   maintenance 522.8  cpumem 4.30   gpumem 4.49   reserved 4.96   augment 0.037
tick 2     kimg 8.0      time 17m 16s      sec/tick 224.3   sec/kimg 55.97   maintenance 0.1    cpumem 4.27   gpumem 4.50   reserved 4.96   augment 0.075
tick 3     kimg 12.0     time 21m 07s      sec/tick 230.4   sec/kimg 57.50   maintenance 0.1    cpumem 4.29   gpumem 4.50   reserved 4.96   augment 0.113
tick 4     kimg 16.0     time 24m 55s      sec/tick 227.8   sec/kimg 56.83   maintenance 0.1    cpumem 4.28   gpumem 4.53   reserved 4.96   augment 0.151
tick 5     kimg 20.1     time 31m 16s      sec/tick 381.3   sec/kimg 95.15   maintenance 0.1    cpumem 4.30   gpumem 4.56   reserved 4.96   augment 0.180
tick 6     kimg 24.1     time 41m 39s      sec/tick 622.9   sec/kimg 155.42  maintenance 0.1    cpumem 4.29   gpumem 4.52   reserved 4.96   augment 0.214
tick 7     kimg 28.1     time 46m 16s      sec/tick 277.0   sec/kimg 69.11   maintenance 0.1    cpumem 4.30   gpumem 4.58   reserved 4.96   augment 0.234
tick 8     kimg 32.1     time 54m 38s      sec/tick 501.8   sec/kimg 125.21  maintenance 0.1    cpumem 4.27   gpumem 4.55   reserved 4.96   augment 0.247
Traceback (most recent call last):
  File "/home/george/work/stylegan3/train.py", line 286, in <module>
    main() # pylint: disable=no-value-for-parameter
  File "/home/george/anaconda3/envs/stylegan3/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/home/george/anaconda3/envs/stylegan3/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/george/anaconda3/envs/stylegan3/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/george/anaconda3/envs/stylegan3/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/home/george/work/stylegan3/train.py", line 281, in main
    launch_training(c=c, desc=desc, outdir=opts.outdir, dry_run=opts.dry_run)
  File "/home/george/work/stylegan3/train.py", line 98, in launch_training
    torch.multiprocessing.spawn(fn=subprocess_fn, args=(c, temp_dir), nprocs=c.num_gpus)
  File "/home/george/anaconda3/envs/stylegan3/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 230, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "/home/george/anaconda3/envs/stylegan3/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 188, in start_processes
    while not context.join():
  File "/home/george/anaconda3/envs/stylegan3/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 130, in join
    raise ProcessExitedException(
torch.multiprocessing.spawn.ProcessExitedException: process 1 terminated with signal SIGKILL
(stylegan3) george@frog:~/work/stylegan3$ /home/george/anaconda3/envs/stylegan3/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 51 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '```

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: Ubuntu 20.04
 - PyTorch version 1.9
 - CUDA toolkit version CUDA 11.3
 - GPU RTX 3090
 - Docker: No

Cannot run visualizer.py

Describe the bug
Cannot run visualizer.py script.

To Reproduce
Steps to reproduce the behavior:

In project root, run python visualizer.py, and the error reads:

/home/xujianjin/data2/anaconda3/envs/cu11/lib/python3.8/site-packages/glfw/__init__.py:834: GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer parameter out of range for operation)'
  warnings.warn(message, GLFWError)
python: /builds/florianrhiem/pyGLFW/glfw-3.3.4/src/input.c:832: glfwSetKeyCallback: Assertion `window != ((void *)0)' failed.
[1]    175404 abort (core dumped)  python visualizer.py

Desktop (please complete the following information):

  • OS: Linux Ubuntu 16.04
  • PyTorch version: pytorch 1.9.0
  • CUDA toolkit version: CUDA 11.1
  • NVIDIA driver version: 450.57
  • GPU: Titan RTX 2080
  • Docker: did not use docker

Thank you and look forward to your response.

Project real image - inversion quality is worst than in StyleGAN2

Hi,
Thanks for sharing StyleGAN3 project!
I've tried doing image inversion (real image to stylegan3 latent) using updated projector.py code of StyleGAN2-ada-pytorch, code taken from: #35 (I used ffhq based model).
however, the inversion image result is abit different from the input image.
doing the inversion process over stylegan2-ada-pytorch model reuslts in better image inversion.
in addition, the optimization loss in stylegan3 is much higher than in stylegan2 (30 vs 0.3).
Is this expected? if so, can you please explain?
see example result below.
Thanks in advanced,
Ofer

image

more memory intensive than stylegan2-ada-pytorch? OOM immediately with same dataset that worked before

I have run stylegan2-ada-pytorch training on Colab for several months successfully. Decided to try stylegan3 today but am getting an OOM immediately while trying to retrain a dataset that was not problematic before. Due to the changing hyperparameters i have slightly different command line for stylegan3

Runtime Tesla V100-SXM2
Memory 16gb

!python stylegan3/train.py --snap=8 --aug=ada --mirror=1 --cfg=stylegan3-r --batch=32 --gamma=400
--target=0.8 --gpus=1 --metrics='None'

Constructing networks...
Setting up PyTorch plugin "bias_act_plugin"... Done.
Setting up PyTorch plugin "filtered_lrelu_plugin"... Done.
Traceback (most recent call last):
File "stylegan3/train.py", line 286, in
main() # pylint: disable=no-value-for-parameter
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "stylegan3/train.py", line 281, in main
launch_training(c=c, desc=desc, outdir=opts.outdir, dry_run=opts.dry_run)
File "stylegan3/train.py", line 96, in launch_training
subprocess_fn(rank=0, c=c, temp_dir=temp_dir)
File "stylegan3/train.py", line 47, in subprocess_fn
training_loop.training_loop(rank=rank, **c)
File "/content/stylegan3/training/training_loop.py", line 168, in training_loop
img = misc.print_module_summary(G, [z, c])
File "/content/stylegan3/torch_utils/misc.py", line 216, in print_module_summary
outputs = module(*inputs)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1071, in _call_impl
result = forward_call(*input, **kwargs)
File "/content/stylegan3/training/networks_stylegan3.py", line 512, in forward
img = self.synthesis(ws, update_emas=update_emas, **synthesis_kwargs)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1071, in _call_impl
result = forward_call(*input, **kwargs)
File "/content/stylegan3/training/networks_stylegan3.py", line 471, in forward
x = getattr(self, name)(x, w, **layer_kwargs)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1071, in _call_impl
result = forward_call(*input, **kwargs)
File "/content/stylegan3/training/networks_stylegan3.py", line 350, in forward
padding=self.conv_kernel-1, demodulate=(not self.is_torgb), input_gain=input_gain)
File "/content/stylegan3/torch_utils/misc.py", line 103, in decorator
return fn(*args, **kwargs)
File "/content/stylegan3/training/networks_stylegan3.py", line 62, in modulated_conv2d
x = conv2d_gradfix.conv2d(input=x, weight=w.to(x.dtype), padding=padding, groups=batch_size)
File "/content/stylegan3/torch_utils/ops/conv2d_gradfix.py", line 37, in conv2d
return _conv2d_gradfix(transpose=False, weight_shape=weight.shape, stride=stride, padding=padding, output_padding=0, dilation=dilation, groups=groups).apply(input, weight, bias)
File "/content/stylegan3/torch_utils/ops/conv2d_gradfix.py", line 119, in forward
c = (a.transpose(1, 2) if transpose else a) @ b.permute(1, 2, 0, 3).flatten(2)
RuntimeError: CUDA out of memory. Tried to allocate 2.96 GiB (GPU 0; 15.78 GiB total capacity; 12.54 GiB already allocated; 1.78 GiB free; 12.56 GiB reserved in total by PyTorch)

Why not making the discriminator translational / rotational invariant?

Really cool paper + code! It was mentioned in the paper that you expect improvements when the discriminator will also be t/r invariant. Why have you not implemented it this way according to the same principles/elements as the generator? Is there any hurdle or did it not work out so well when you tried it?

onnx convert

Is there a problem converting to onnx? In the case of stylegan2, the problem of converting to onnx has not been solved yet. I'm worried that stylegan3 will have the same problem.

Transfer learning and image rotation

Not sure if looks right, but when trying to resume from a previous stylegan2 pkl, I got the initial fakes looking as if they were starting from scratch:
fakes000000

After a while they do start to take shape, just rotated:
fakes000256

All normal?

I also tried resuming from a couple of the listed stylegan3 pkls, but got tensor errors a bit like if the image sizes were different (e.g. "The size of tensor a (128) must match the size of tensor b (64) at non-singleton dimension 0")

Any and all suggestions gratefully received!

stuck at "Training for 25000 kimg..."

Describe the bug
Previously stuck at relu step (see issue #48 ), now stuck at the "Training for 25000 kimg step. The reason is probably ninja (version 1.10.2), the GPU stopped being engaged (from P2 to P8), possible due to subprocess spawning error. The key error message seems to be:
LINK : fatal error LNK1104: cannot open file 'bias_act_plugin.pyd'
ninja: build stopped: subcommand failed.

To Reproduce
(stylegan3) C:\Users\fsn20\PycharmProjects\stylegan3>python train.py --outdir=results --cfg=stylegan3-r --data=dataset --gpus=2 --batch=16 --gamma=8.2

Training options:
{
"G_kwargs": {
"class_name": "training.networks_stylegan3.Generator",
"z_dim": 512,
"w_dim": 512,
"mapping_kwargs": {
"num_layers": 2
},
"channel_base": 65536,
"channel_max": 1024,
"magnitude_ema_beta": 0.9994456359721023,
"conv_kernel": 1,
"use_radial_filters": true
},
"D_kwargs": {
"class_name": "training.networks_stylegan2.Discriminator",
"block_kwargs": {
"freeze_layers": 0
},
"mapping_kwargs": {},
"epilogue_kwargs": {
"mbstd_group_size": 4
},
"channel_base": 32768,
"channel_max": 512
},
"G_opt_kwargs": {
"class_name": "torch.optim.Adam",
"betas": [
0,
0.99
],
"eps": 1e-08,
"lr": 0.0025
},
"D_opt_kwargs": {
"class_name": "torch.optim.Adam",
"betas": [
0,
0.99
],
"eps": 1e-08,
"lr": 0.002
},
"loss_kwargs": {
"class_name": "training.loss.StyleGAN2Loss",
"r1_gamma": 8.2,
"blur_init_sigma": 10,
"blur_fade_kimg": 100.0
},
"data_loader_kwargs": {
"pin_memory": true,
"prefetch_factor": 2,
"num_workers": 3
},
"training_set_kwargs": {
"class_name": "training.dataset.ImageFolderDataset",
"path": "dataset",
"use_labels": false,
"max_size": 92,
"xflip": false,
"resolution": 512,
"random_seed": 0
},
"num_gpus": 2,
"batch_size": 16,
"batch_gpu": 8,
"metrics": [
"fid50k_full"
],
"total_kimg": 25000,
"kimg_per_tick": 4,
"image_snapshot_ticks": 50,
"network_snapshot_ticks": 50,
"random_seed": 0,
"ema_kimg": 5.0,
"augment_kwargs": {
"class_name": "training.augment.AugmentPipe",
"xflip": 1,
"rotate90": 1,
"xint": 1,
"scale": 1,
"rotate": 1,
"aniso": 1,
"xfrac": 1,
"brightness": 1,
"contrast": 1,
"lumaflip": 1,
"hue": 1,
"saturation": 1
},
"ada_target": 0.6,
"run_dir": "results\00005-stylegan3-r-dataset-gpus2-batch16-gamma8.2"
}

Output directory: results\00005-stylegan3-r-dataset-gpus2-batch16-gamma8.2
Number of GPUs: 2
Batch size: 16 images
Training duration: 25000 kimg
Dataset path: dataset
Dataset size: 92 images
Dataset resolution: 512
Dataset labels: False
Dataset x-flips: False

Creating output directory...
Launching processes...
Loading training set...

Num images: 92
Image shape: [3, 512, 512]
Label shape: [0]

Constructing networks...
Setting up PyTorch plugin "bias_act_plugin"... Done.
Setting up PyTorch plugin "filtered_lrelu_plugin"... Done.

Generator Parameters Buffers Output shape Datatype


mapping.fc0 262656 - [8, 512] float32
mapping.fc1 262656 - [8, 512] float32
mapping - 512 [8, 16, 512] float32
synthesis.input.affine 2052 - [8, 4] float32
synthesis.input 1048576 3081 [8, 1024, 36, 36] float32
synthesis.L0_36_1024.affine 525312 - [8, 1024] float32
synthesis.L0_36_1024 1049600 157 [8, 1024, 36, 36] float32
synthesis.L1_36_1024.affine 525312 - [8, 1024] float32
synthesis.L1_36_1024 1049600 157 [8, 1024, 36, 36] float32
synthesis.L2_52_1024.affine 525312 - [8, 1024] float32
synthesis.L2_52_1024 1049600 169 [8, 1024, 52, 52] float32
synthesis.L3_52_1024.affine 525312 - [8, 1024] float32
synthesis.L3_52_1024 1049600 157 [8, 1024, 52, 52] float32
synthesis.L4_84_1024.affine 525312 - [8, 1024] float32
synthesis.L4_84_1024 1049600 169 [8, 1024, 84, 84] float16
synthesis.L5_84_1024.affine 525312 - [8, 1024] float32
synthesis.L5_84_1024 1049600 157 [8, 1024, 84, 84] float16
synthesis.L6_148_1024.affine 525312 - [8, 1024] float32
synthesis.L6_148_1024 1049600 169 [8, 1024, 148, 148] float16
synthesis.L7_148_967.affine 525312 - [8, 1024] float32
synthesis.L7_148_967 991175 157 [8, 967, 148, 148] float16
synthesis.L8_276_645.affine 496071 - [8, 967] float32
synthesis.L8_276_645 624360 169 [8, 645, 276, 276] float16
synthesis.L9_276_431.affine 330885 - [8, 645] float32
synthesis.L9_276_431 278426 157 [8, 431, 276, 276] float16
synthesis.L10_532_287.affine 221103 - [8, 431] float32
synthesis.L10_532_287 123984 169 [8, 287, 532, 532] float16
synthesis.L11_532_192.affine 147231 - [8, 287] float32
synthesis.L11_532_192 55296 157 [8, 192, 532, 532] float16
synthesis.L12_532_128.affine 98496 - [8, 192] float32
synthesis.L12_532_128 24704 25 [8, 128, 532, 532] float16
synthesis.L13_512_128.affine 65664 - [8, 128] float32
synthesis.L13_512_128 16512 25 [8, 128, 512, 512] float16
synthesis.L14_512_3.affine 65664 - [8, 128] float32
synthesis.L14_512_3 387 1 [8, 3, 512, 512] float16
synthesis - - [8, 3, 512, 512] float32


Total 16665594 5588 - -

Setting up PyTorch plugin "upfirdn2d_plugin"... Done.

Discriminator Parameters Buffers Output shape Datatype


b512.fromrgb 256 16 [8, 64, 512, 512] float16
b512.skip 8192 16 [8, 128, 256, 256] float16
b512.conv0 36928 16 [8, 64, 512, 512] float16
b512.conv1 73856 16 [8, 128, 256, 256] float16
b512 - 16 [8, 128, 256, 256] float16
b256.skip 32768 16 [8, 256, 128, 128] float16
b256.conv0 147584 16 [8, 128, 256, 256] float16
b256.conv1 295168 16 [8, 256, 128, 128] float16
b256 - 16 [8, 256, 128, 128] float16
b128.skip 131072 16 [8, 512, 64, 64] float16
b128.conv0 590080 16 [8, 256, 128, 128] float16
b128.conv1 1180160 16 [8, 512, 64, 64] float16
b128 - 16 [8, 512, 64, 64] float16
b64.skip 262144 16 [8, 512, 32, 32] float16
b64.conv0 2359808 16 [8, 512, 64, 64] float16
b64.conv1 2359808 16 [8, 512, 32, 32] float16
b64 - 16 [8, 512, 32, 32] float16
b32.skip 262144 16 [8, 512, 16, 16] float32
b32.conv0 2359808 16 [8, 512, 32, 32] float32
b32.conv1 2359808 16 [8, 512, 16, 16] float32
b32 - 16 [8, 512, 16, 16] float32
b16.skip 262144 16 [8, 512, 8, 8] float32
b16.conv0 2359808 16 [8, 512, 16, 16] float32
b16.conv1 2359808 16 [8, 512, 8, 8] float32
b16 - 16 [8, 512, 8, 8] float32
b8.skip 262144 16 [8, 512, 4, 4] float32
b8.conv0 2359808 16 [8, 512, 8, 8] float32
b8.conv1 2359808 16 [8, 512, 4, 4] float32
b8 - 16 [8, 512, 4, 4] float32
b4.mbstd - - [8, 513, 4, 4] float32
b4.conv 2364416 16 [8, 512, 4, 4] float32
b4.fc 4194816 - [8, 512] float32
b4.out 513 - [8, 1] float32


Total 28982849 480 - -

Setting up augmentation...
Distributing across 2 GPUs...
Setting up training phases...
Exporting sample images...
Initializing logs...
Training for 25000 kimg...

Aborted!
Process SpawnProcess-2:
Traceback (most recent call last):
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1666, in _run_ninja_build
subprocess.run(
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\multiprocessing\spawn.py", line 59, in _wrap
fn(i, *args)
File "C:\Users\fsn20\PycharmProjects\stylegan3\train.py", line 47, in subprocess_fn
training_loop.training_loop(rank=rank, **c)
File "C:\Users\fsn20\PycharmProjects\stylegan3\training\training_loop.py", line 278, in training_loop
loss.accumulate_gradients(phase=phase.name, real_img=real_img, real_c=real_c, gen_z=gen_z, gen_c=gen_c, gain=phase.interval, cur_nimg=cur_nimg)
File "C:\Users\fsn20\PycharmProjects\stylegan3\training\loss.py", line 74, in accumulate_gradients
gen_img, _gen_ws = self.run_G(gen_z, gen_c)
File "C:\Users\fsn20\PycharmProjects\stylegan3\training\loss.py", line 43, in run_G
ws = self.G.mapping(z, c, update_emas=update_emas)
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\fsn20\PycharmProjects\stylegan3\training\networks_stylegan3.py", line 151, in forward
x = getattr(self, f'fc{idx}')(x)
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\fsn20\PycharmProjects\stylegan3\training\networks_stylegan3.py", line 100, in forward
x = bias_act.bias_act(x, b, act=self.activation)
File "C:\Users\fsn20\PycharmProjects\stylegan3\torch_utils\ops\bias_act.py", line 84, in bias_act
if impl == 'cuda' and x.device.type == 'cuda' and _init():
File "C:\Users\fsn20\PycharmProjects\stylegan3\torch_utils\ops\bias_act.py", line 41, in _init
_plugin = custom_ops.get_plugin(
File "C:\Users\fsn20\PycharmProjects\stylegan3\torch_utils\custom_ops.py", line 136, in get_plugin
torch.utils.cpp_extension.load(name=module_name, build_directory=cached_build_dir,
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1080, in load
return _jit_compile(
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1293, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1405, in _write_ninja_file_and_build_library
_run_ninja_build(
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1682, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'bias_act_plugin': [1/2] cl /showIncludes -DTORCH_EXTENSION_NAME=bias_act_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\fsn20\miniconda
3\envs\stylegan3\lib\site-packages\torch\include -IC:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\fsn20\miniconda3\env
s\stylegan3\lib\site-packages\torch\include\TH -IC:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUD
A\v11.4\include" -IC:\Users\fsn20\miniconda3\envs\stylegan3\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -c C:\Users\fsn20
\AppData\Local\torch_extensions\torch_extensions\Cache\bias_act_plugin\3cb576a0039689487cfba59279dd6d46-nvidia-geforce-rtx-3090\bias_act.cpp /Fobias_act.o
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30133 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=at::Tensor
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T

' being compiled
with
[
T=at::Tensor
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=at::Tensor
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<at::Tens
or>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/TensorBody.h(734): note: see reference to class template instantiation 'c10::optional<at::Tenso
r>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=at::Tensor
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=at::Generator
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=at::Generator
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=at::Generator
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<at::Gene
rator>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/TensorBody.h(800): note: see reference to class template instantiation 'c10::optional<at::Gener
ator>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=at::Generator
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::imp
l::InlineDeviceGuardc10::impl::VirtualGuardImpl>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/core/impl/InlineDeviceGuard.h(427): note: see reference to class template instantiation 'c10::optiona
l<c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/core/DeviceGuard.h(178): note: see reference to class template instantiation 'c10::impl::InlineOption
alDeviceGuardc10::impl::VirtualGuardImpl' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::string
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::string
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::string
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::str
ing>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/jit_type_base.h(107): note: see reference to class template instantiation 'c10::optional<std::s
tring>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::string
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::vector<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::vector<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::vector<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::vec
tor<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/jit_type.h(351): note: see reference to class template instantiation 'c10::optional<std::vector
<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::vector<c10::ShapeSymbol,std::allocatorc10::ShapeSymbol>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::vector<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::vector<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::vector<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::vec
tor<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/jit_type.h(425): note: see reference to class template instantiation 'c10::optional<std::vector
<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/jit_type.h(664): note: see reference to class template instantiation 'c10::VaryingShape<c10::St
ride>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::vector<c10::optionalc10::Stride,std::allocator<c10::optionalc10::Stride>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::vector<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::vector<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::vector<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::vec
tor<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/jit_type.h(425): note: see reference to class template instantiation 'c10::optional<std::vector
<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/jit_type.h(470): note: see reference to class template instantiation 'c10::VaryingShape<int64_t
' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::vector<c10::optional<int64_t>,std::allocator<c10::optional<int64_t>>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::vector<int64_t,std::allocator<int64_t>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::vector<int64_t,std::allocator<int64_t>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::vector<int64_t,std::allocator<int64_t>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::vec
tor<int64_t,std::allocator<int64_t>>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/jit_type.h(568): note: see reference to class template instantiation 'c10::optional<std::vector
<int64_t,std::allocator<int64_t>>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::vector<int64_t,std::allocator<int64_t>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::QualifiedName
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::QualifiedName
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::QualifiedName
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::Qua
lifiedName>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/jit_type.h(903): note: see reference to class template instantiation 'c10::optional<c10::Qualif
iedName>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::QualifiedName
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::imp
l::InlineStreamGuardc10::impl::VirtualGuardImpl>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/core/impl/InlineStreamGuard.h(196): note: see reference to class template instantiation 'c10::optiona
l<c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/core/StreamGuard.h(139): note: see reference to class template instantiation 'c10::impl::InlineOption
alStreamGuardc10::impl::VirtualGuardImpl' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::impl::InlineStreamGuardc10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::imp
l::VirtualGuardImpl>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/core/impl/InlineStreamGuard.h(231): note: see reference to class template instantiation 'c10::optiona
l' being compiled
with
[
T=c10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/core/StreamGuard.h(162): note: see reference to class template instantiation 'c10::impl::InlineMultiS
treamGuardc10::impl::VirtualGuardImpl' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::impl::VirtualGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::vector<std::reference_wrapper,std::allocator<std::reference_wrapper>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::vector<std::reference_wrapper,std::allocator<std::reference_wrapper>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::vector<std::reference_wrapper,std::allocator<std::reference_wrapper>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::vec
tor<std::reference_wrapper,std::allocator<std::reference_wrapper>>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/ivalue_inl.h(362): note: see reference to class template instantiation 'c10::optional<std::vect
or<std::reference_wrapper,std::allocator<std::reference_wrapper>>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::vector<std::reference_wrapper,std::allocator<std::reference_wrapper>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::OperatorName
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::OperatorName
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::OperatorName
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::Ope
ratorName>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/record_function.h(306): note: see reference to class template instantiation 'c10::optional<c10::Oper
atorName>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::OperatorName
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=at::DimVector
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=at::DimVector
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=at::DimVector
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<at::DimV
ector>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/TensorIterator.h(616): note: see reference to class template instantiation 'c10::optional<at::DimVec
tor>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=at::DimVector
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=torch::autograd::ViewInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=torch::autograd::ViewInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=torch::autograd::ViewInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<torch::a
utograd::ViewInfo>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/autograd/variable.h(529): note: see reference to class template instantiation 'c10::optional' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=torch::autograd::ViewInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::IValue
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::IValue
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::IValue
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::IVa
lue>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/function_schema.h(115): note: see reference to class template instantiation 'c10::optional<c10:
:IValue>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::IValue
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::AliasInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::AliasInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::AliasInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::Ali
asInfo>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/function_schema.h(118): note: see reference to class template instantiation 'c10::optional<c10:
:AliasInfo>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::AliasInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::tuplestd::string,size_t,size_t
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::tuplestd::string,size_t,size_t
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::tuplestd::string,size_t,size_t
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::tup
lestd::string,size_t,size_t>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/jit/frontend/source_range.h(146): note: see reference to class template instantiation 'c10::op
tional<std::tuplestd::string,size_t,size_t>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::tuplestd::string,size_t,size_t
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=torch::jit::SourceRange
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=torch::jit::SourceRange
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=torch::jit::SourceRange
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<torch::j
it::SourceRange>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/jit/frontend/source_range.h(169): note: see reference to class template instantiation 'c10::op
tionaltorch::jit::SourceRange' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=torch::jit::SourceRange
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=torch::jit::InlinedCallStackPtr
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=torch::jit::InlinedCallStackPtr
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=torch::jit::InlinedCallStackPtr
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<torch::j
it::InlinedCallStackPtr>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/jit/ir/scope.h(121): note: see reference to class template instantiation 'c10::optional<torch:
:jit::InlinedCallStackPtr>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=torch::jit::InlinedCallStackPtr
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=torch::jit::ModuleInstanceInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=torch::jit::ModuleInstanceInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=torch::jit::ModuleInstanceInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<torch::j
it::ModuleInstanceInfo>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/jit/ir/scope.h(125): note: see reference to class template instantiation 'c10::optional<torch:
:jit::ModuleInstanceInfo>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=torch::jit::ModuleInstanceInfo
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=torch::jit::ScopePtr
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=torch::jit::ScopePtr
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=torch::jit::ScopePtr
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<torch::j
it::ScopePtr>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/jit/ir/constants.h(29): note: see reference to class template instantiation 'c10::optional' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=torch::jit::ScopePtr
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::impl::AnnotatedSchema
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::impl::AnnotatedSchema
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::impl::AnnotatedSchema
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::imp
l::AnnotatedSchema>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/dispatch/OperatorEntry.h(182): note: see reference to class template instantiation 'c10::option
alc10::impl::AnnotatedSchema' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::impl::AnnotatedSchema
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::impl::OperatorEntry::CppSignatureWithDebug
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::impl::OperatorEntry::CppSignatureWithDebug
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::impl::OperatorEntry::CppSignatureWithDebug
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::imp
l::OperatorEntry::CppSignatureWithDebug>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/dispatch/OperatorEntry.h(234): note: see reference to class template instantiation 'c10::option
alc10::impl::OperatorEntry::CppSignatureWithDebug' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::impl::OperatorEntry::CppSignatureWithDebug
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::eitherc10::OperatorName,c10::FunctionSchema
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::eitherc10::OperatorName,c10::FunctionSchema
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::eitherc10::OperatorName,c10::FunctionSchema
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::eit
herc10::OperatorName,c10::FunctionSchema>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\ATen/core/op_registration/op_registration.h(434): note: see reference to class template instantiation 'c1
0::optional<c10::eitherc10::OperatorName,c10::FunctionSchema>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::eitherc10::OperatorName,c10::FunctionSchema
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=at::ThreadLocalState
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=at::ThreadLocalState
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=at::ThreadLocalState
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<at::Thre
adLocalState>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/jit/runtime/interpreter.h(141): note: see reference to class template instantiation 'c10::opti
onalat::ThreadLocalState' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=at::ThreadLocalState
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::shared_ptrtorch::jit::Graph
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::shared_ptrtorch::jit::Graph
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::shared_ptrtorch::jit::Graph
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::sha
red_ptrtorch::jit::Graph>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/jit/api/function_impl.h(124): note: see reference to class template instantiation 'c10::option
al<std::shared_ptrtorch::jit::Graph>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::shared_ptrtorch::jit::Graph
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=torch::jit::Method
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=torch::jit::Method
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=torch::jit::Method
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<torch::j
it::Method>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/jit/api/object.h(41): note: see reference to class template instantiation 'c10::optional' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=torch::jit::Method
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::vector<std::string,std::allocatorstd::string>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::vector<std::string,std::allocatorstd::string>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::vector<std::string,std::allocatorstd::string>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::vec
tor<std::string,std::allocatorstd::string>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/jit/api/module.h(295): note: see reference to class template instantiation 'c10::optional<std:
:vector<std::string,std::allocatorstd::string>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::vector<std::string,std::allocatorstd::string>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=torch::nn::TripletMarginWithDistanceLossOptions::distance_function_t
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=torch::nn::TripletMarginWithDistanceLossOptions::distance_function_t
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=torch::nn::TripletMarginWithDistanceLossOptions::distance_function_t
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<torch::n
n::TripletMarginWithDistanceLossOptions::distance_function_t>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch\csrc\api\include\torch/nn/options/loss.h(404): note: see reference to class template instantiation
'c10::optionaltorch::nn::TripletMarginWithDistanceLossOptions::distance_function_t' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=torch::nn::TripletMarginWithDistanceLossOptions::distance_function_t
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::vector<double,std::allocator>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::vector<double,std::allocator>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::vector<double,std::allocator>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::vec
tor<double,std::allocator>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch\csrc\api\include\torch/nn/options/upsampling.h(26): note: see reference to class template instantia
tion 'c10::optional<std::vector<double,std::allocator>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::vector<double,std::allocator>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::tupleat::Tensor,at::Tensor
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::tupleat::Tensor,at::Tensor
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::tupleat::Tensor,at::Tensor
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::tup
leat::Tensor,at::Tensor>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch\csrc\api\include\torch/nn/modules/rnn.h(157): note: see reference to class template instantiation '
c10::optional<std::tupleat::Tensor,at::Tensor>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::tupleat::Tensor,at::Tensor
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::function<void (const torch::autograd::profiler::thread_event_lists &)>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::function<void (const torch::autograd::profiler::thread_event_lists &)>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::function<void (const torch::autograd::profiler::thread_event_lists &)>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::fun
ction<void (const torch::autograd::profiler::thread_event_lists &)>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/autograd/profiler_legacy.h(514): note: see reference to class template instantiation 'c10::opt
ional<std::function<void (const torch::autograd::profiler::thread_event_lists &)>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::function<void (const torch::autograd::profiler::thread_event_lists &)>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::vector<std::vector<torch::autograd::profiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>,std::allocator<std::vector<torch::autograd::p
rofiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::vector<std::vector<torch::autograd::profiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>,std::allocator<std::vector<torch::autograd::p
rofiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::vector<std::vector<torch::autograd::profiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>,std::allocator<std::vector<torch::autograd::p
rofiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::vec
tor<std::vector<torch::autograd::profiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>,std::allocator<std::vector<torch::autograd::profiler::LegacyEvent,s
td::allocatortorch::autograd::profiler::LegacyEvent>>>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch/csrc/autograd/profiler_legacy.h(588): note: see reference to class template instantiation 'c10::opt
ional<std::vector<std::vector<torch::autograd::profiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>,std::allocator<std::vector<torch::autograd::profiler:
:LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>>>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::vector<std::vector<torch::autograd::profiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>,std::allocator<std::vector<torch::autograd::p
rofiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>>>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=std::vector<at::Tensor,std::allocatorat::Tensor>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=std::vector<at::Tensor,std::allocatorat::Tensor>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=std::vector<at::Tensor,std::allocatorat::Tensor>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::vec
tor<at::Tensor,std::allocatorat::Tensor>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch\csrc\api\include\torch/optim/lbfgs.h(47): note: see reference to class template instantiation 'c10:
:optional<std::vector<at::Tensor,std::allocatorat::Tensor>>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=std::vector<at::Tensor,std::allocatorat::Tensor>
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::impl::InlineDeviceGuardc10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::impl::InlineDeviceGuardc10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::impl::InlineDeviceGuardc10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::imp
l::InlineDeviceGuardc10::cuda::impl::CUDAGuardImpl>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/core/impl/InlineDeviceGuard.h(427): note: see reference to class template instantiation 'c10::optiona
l<c10::impl::InlineDeviceGuardc10::cuda::impl::CUDAGuardImpl>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/cuda/CUDAGuard.h(140): note: see reference to class template instantiation 'c10::impl::InlineOptional
DeviceGuardc10::cuda::impl::CUDAGuardImpl' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::impl::InlineDeviceGuardc10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::impl::InlineStreamGuardc10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::impl::InlineStreamGuardc10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::impl::InlineStreamGuardc10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::imp
l::InlineStreamGuardc10::cuda::impl::CUDAGuardImpl>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/core/impl/InlineStreamGuard.h(196): note: see reference to class template instantiation 'c10::optiona
l<c10::impl::InlineStreamGuardc10::cuda::impl::CUDAGuardImpl>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/cuda/CUDAGuard.h(273): note: see reference to class template instantiation 'c10::impl::InlineOptional
StreamGuardc10::cuda::impl::CUDAGuardImpl' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::impl::InlineStreamGuardc10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(183): warning C4624: 'c10::constexpr_storage_t': destructor was implicitly defined
as deleted
with
[
T=c10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(367): note: see reference to class template instantiation 'c10::constexpr_storage_t<T
' being compiled
with
[
T=c10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to class template instantiation 'c10::trivially_copyable_op
timization_optional_base' being compiled
with
[
T=c10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<c10::cud
a::impl::CUDAGuardImpl>' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/core/impl/InlineStreamGuard.h(231): note: see reference to class template instantiation 'c10::optiona
l' being compiled
with
[
T=c10::cuda::impl::CUDAGuardImpl
]
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/cuda/CUDAGuard.h(292): note: see reference to class template instantiation 'c10::impl::InlineMultiStr
eamGuardc10::cuda::impl::CUDAGuardImpl' being compiled
C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\c10/util/Optional.h(395): warning C4624: 'c10::trivially_copyable_optimization_optional_base': destruc
tor was implicitly defined as deleted
with
[
T=c10::cuda::impl::CUDAGuardImpl
]
[2/2] "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" bias_act.o bias_act.cuda.o /nologo /DLL c10.lib c10_cuda.
lib torch_cpu.lib torch_cuda_cu.lib -INCLUDE:?searchsorted_cuda@native@at@@ya?AVTensor@2@AEBV32@0_N1@Z torch_cuda_cpp.lib -INCLUDE:?warp_size@cuda@at@@yahxz torch.lib /LIBPATH:C:
\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\lib torch_python.lib /LIBPATH:C:\Users\fsn20\miniconda3\envs\stylegan3\libs "/LIBPATH:C:\Program Files\NVIDIA GPU C
omputing Toolkit\CUDA\v11.4\lib/x64" cudart.lib /out:bias_act_plugin.pyd
FAILED: bias_act_plugin.pyd
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" bias_act.o bias_act.cuda.o /nologo /DLL c10.lib c10_cuda.lib to
rch_cpu.lib torch_cuda_cu.lib -INCLUDE:?searchsorted_cuda@native@at@@ya?AVTensor@2@AEBV32@0_N1@Z torch_cuda_cpp.lib -INCLUDE:?warp_size@cuda@at@@yahxz torch.lib /LIBPATH:C:\Users
\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\lib torch_python.lib /LIBPATH:C:\Users\fsn20\miniconda3\envs\stylegan3\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computi
ng Toolkit\CUDA\v11.4\lib/x64" cudart.lib /out:bias_act_plugin.pyd
LINK : fatal error LNK1104: cannot open file 'bias_act_plugin.pyd'
ninja: build stopped: subcommand failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\multiprocessing\spawn.py", line 65, in _wrap
error_queue.put(traceback.format_exc())
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\multiprocessing\queues.py", line 375, in put
self._writer.send_bytes(obj)
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\multiprocessing\connection.py", line 205, in send_bytes
self._send_bytes(m[offset:offset + size])
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\multiprocessing\connection.py", line 288, in _send_bytes
waitres = _winapi.WaitForMultipleObjects(
KeyboardInterrupt

Desktop (please complete the following information):

  • OS: [Windows 10]
  • PyTorch version (pytorch 1.9.0)
  • CUDA toolkit version (CUDA 11.4)
  • NVIDIA driver version 471
  • GPU [RTX 3090]
  • Docker: No

Additional context
Ninja log file is here:

ninja log v5

3 3802 6568154534670044 bias_act.cuda.o 65b65521cc23fcdf
0 7728 6568154573915312 bias_act.o bdbdc5d60e762133
7732 7808 6568154574795210 bias_act_plugin.pyd 32eb53e31286dd81
4 7767 6568155174014625 bias_act.o bdbdc5d60e762133
7768 7839 6568155174782573 bias_act_plugin.pyd 32eb53e31286dd81
4 7597 6568156027291701 bias_act.o bdbdc5d60e762133
5 3747 6568162533323240 bias_act.cuda.o c9333a9bf1b2b303
2 7172 6568162567513754 bias_act.o b32d4bab1a9ab492
3 6987 6568164823930409 bias_act.o b32d4bab1a9ab492
6990 7082 6568164824958035 bias_act_plugin.pyd df4028bbc0a8483d
3 6859 6568165680850791 bias_act.o b32d4bab1a9ab492
5 3880 6568177700294856 bias_act.cuda.o 65b65521cc23fcdf
2 7920 6568177740621033 bias_act.o bdbdc5d60e762133
7922 7997 6568177741508662 bias_act_plugin.pyd 32eb53e31286dd81
4 7592 6568178590573265 bias_act.o bdbdc5d60e762133

ninja build is here:
ninja_required_version = 1.3
cxx = cl
nvcc = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin\nvcc

cflags = -DTORCH_EXTENSION_NAME=bias_act_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include -IC:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\TH -IC:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\include" -IC:\Users\fsn20\miniconda3\envs\stylegan3\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc
post_cflags =
cuda_cflags = -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=bias_act_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include -IC:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\TH -IC:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\include" -IC:\Users\fsn20\miniconda3\envs\stylegan3\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --use_fast_math
cuda_post_cflags =
ldflags = /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda_cu.lib -INCLUDE:?searchsorted_cuda@native@at@@ya?AVTensor@2@AEBV32@0_N1@Z torch_cuda_cpp.lib -INCLUDE:?warp_size@cuda@at@@yahxz torch.lib /LIBPATH:C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\lib torch_python.lib /LIBPATH:C:\Users\fsn20\miniconda3\envs\stylegan3\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\lib/x64" cudart.lib

rule compile
command = cl /showIncludes $cflags -c $in /Fo$out $post_cflags
deps = msvc

rule cuda_compile
depfile = $out.d
deps = gcc
command = $nvcc --generate-dependencies-with-compile --dependency-output $out.d $cuda_cflags -c $in -o $out $cuda_post_cflags

rule link
command = "C$:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" $in /nologo $ldflags /out:$out

build bias_act.o: compile C$:\Users\fsn20\AppData\Local\torch_extensions\torch_extensions\Cache\bias_act_plugin\3cb576a0039689487cfba59279dd6d46-nvidia-geforce-rtx-3090\bias_act.cpp
build bias_act.cuda.o: cuda_compile C$:\Users\fsn20\AppData\Local\torch_extensions\torch_extensions\Cache\bias_act_plugin\3cb576a0039689487cfba59279dd6d46-nvidia-geforce-rtx-3090\bias_act.cu

build bias_act_plugin.pyd: link bias_act.o bias_act.cuda.o

default bias_act_plugin.pyd

Unable to set image resolution.

I see the parameter block_resolutions is removed in stylegan3 and I cannot find a way to set the output size.
Setting img_resolution doesn't work as showed below:

import torch
import dnnlib, legacy

def load_model(device, url):
with dnnlib.util.open_url(url) as f:
generator = legacy.load_network_pkl(f)['G_ema'].to(device)
return generator

if name == 'main':
device = 'cuda'
G = load_model(device, './model_zoo/ffhq_stylegan3.pkl')
G.img_resolution = 512
z = torch.randn(1, 512).to(device)
ws = G.mapping(z, 0, truncation_psi=0.6)
imgs = G.synthesis(ws)
imgs = ((imgs.permute(0, 2, 3, 1)+1)*127.5).clamp(0, 255).to(torch.uint8).cpu().numpy()
print(imgs.shape)

syntax error in gen_images.py?

Describe the bug
A clear and concise description of what the bug is.

gen_images.py might have a syntax error. Don't know if this is my config or a bug with the repo.

  File "gen_images.py", line 34
    if m := range_re.match(p):
          ^
SyntaxError: invalid syntax

To Reproduce
Steps to reproduce the behavior:

  1. In '...' directory, run command '...'
  2. See error (copy&paste full log, including exceptions and stacktraces).

See colab notebook:

https://gist.github.com/duskvirkus/46257dfc709854577128c0a04ffda987

Please copy&paste text instead of screenshots for better searchability.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot from 2021-10-11 22-35-33

Desktop (please complete the following information):

  • OS: [e.g. Linux Ubuntu 20.04, Windows 10] ubuntu (colab instance)
  • PyTorch version (e.g., pytorch 1.9.0)
  • CUDA toolkit version (e.g., CUDA 11.4)
  • NVIDIA driver version
  • GPU [e.g., Titan V, RTX 3090]
  • Docker: did you use Docker? If yes, specify docker image URL (e.g., nvcr.io/nvidia/pytorch:21.08-py3)
    Screenshot from 2021-10-11 22-44-38

no docker

Additional context
Add any other context about the problem here.

Question: Is it possible to use stylegan2(-ada) models with stylegan3?

I know that this form is ment for bug reports but I currently can't find another way to ask.

Is it possible to use stylegan2-ada(-pytorch) models with stylegan3 and expect decent results or do I need to fully retrain the model?

If I do need to retrain the model, is there a way to make it augment the dataset like stylegan2-ada? If there is a way to do that, could you please provide me on how to do that?

Thanks so much! I'm sure this is going to be awesome 😉😉

Not using GPU

Using RTX 2080, it does not appear that stylegan 3 is using my gpu. When training a model, it takes 40+ minutes for ever tick (of 4 kimg). Using default training commands. Any idea on how to fix?

C++17 language extension failure when setting up lrelu plugin.

Describe the bug
Failed to install lrelu plugin for pytorch.

Setting up PyTorch plugin "filtered_lrelu_plugin"... Failed!

error C4984: 'if constexpr' is a C++17 language extension ninja: build stopped: subcommand failed.

To Reproduce
Steps to reproduce the behavior:
python gen_images.py --outdir=out --trunc=1 --seeds=2 --network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl

Desktop (please complete the following information):

  • OS: Windows 10
  • PyTorch version 1.9.1
  • CUDA toolkit version 11.1
  • NVIDIA driver version latest
  • GPU RTX 3080
  • Docker: No

imageio dependency missing in Dockerfile

Describe the bug
Hi there, excited to give StyleGAN3 a go! I built the docker image locally using docker build --tag stylegan3 .. When I went to use the image, I got this error:

Traceback (most recent call last): File "gen_video.py", line 18, in <module> import imageio ModuleNotFoundError: No module named 'imageio'

I was able to fix this error and get it running by adding imageio as a dependency to the pip install command in the dockerfile (

RUN pip install imageio-ffmpeg==0.4.4 pyspng==0.1.0
) so it now reads: RUN pip install imageio imageio-ffmpeg==0.4.4 pyspng==0.1.0

To Reproduce
Steps to reproduce the behavior:

  1. In root directory, run command docker run --gpus all -it --rm --user $(id -u):$(id -g) \ -v pwd:/scratch --workdir /scratch -e HOME=/scratch \ stylegan3 \ python gen_video.py --output=lerp.mp4 --trunc=1 --seeds=0-31 --grid=4x2 \ --network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl
  2. See error Traceback (most recent call last): File "gen_video.py", line 18, in <module> import imageio ModuleNotFoundError: No module named 'imageio'

Expected behavior
A video getting generated :)

Screenshots

Desktop (please complete the following information):

  • OS: Linux Ubuntu 18.04.5 LTS
  • CUDA 11.2
  • NVIDIA driver version: 460.27.04
  • GPU: RTX 3090
  • Docker: did you use Docker? Yep, the version in the Dockerfile: nvcr.io/nvidia/pytorch:21.08-py3

Visualizer stuck when loading pickle

Describe the bug
Upon loading a pickle file, stylegan3-r-ffhqu-256x256.pkl in my case, into the visualizer, the program is stuck at Setting up PyTorch plugin "filtered_lrelu_plugin"....

To Reproduce
Steps to reproduce the behavior:

  1. Run visualizer.py and load a pickle file. Or usegen_video.py with the command: python gen_video.py --output=lerp.mp4 --trunc=1 --seeds=0-31 --grid=4x2 --network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl
  2. Error Log:
Traceback (most recent call last):
  File "/home/x/Development/stylegan3/viz/renderer.py", line 136, in render
    self._render_impl(res, **args)
  File "/home/x/Development/stylegan3/viz/renderer.py", line 291, in _render_impl
    out, layers = self.run_synthesis_net(G.synthesis, w, capture_layer=layer_name, **synthesis_kwargs)
  File "/home/x/Development/stylegan3/viz/renderer.py", line 370, in run_synthesis_net
    out = net(*args, **kwargs)
  File "/home/x/miniconda3/envs/stylegan3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1071, in _call_impl
    result = forward_call(*input, **kwargs)
  File "<string>", line 463, in forward
  File "/home/x/miniconda3/envs/stylegan3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1071, in _call_impl
    result = forward_call(*input, **kwargs)
  File "<string>", line 347, in forward
  File "/home/x/Development/stylegan3/torch_utils/ops/filtered_lrelu.py", line 119, in filtered_lrelu
    if impl == 'x' and x.device.type == 'cuda' and _init():
  File "/home/x/Development/stylegan3/torch_utils/ops/filtered_lrelu.py", line 27, in _init
    _plugin = custom_ops.get_plugin(
  File "/home/x/Development/stylegan3/torch_utils/custom_ops.py", line 136, in get_plugin
    torch.utils.cpp_extension.load(name=module_name, build_directory=cached_build_dir,
  File "/home/x/miniconda3/envs/stylegan3/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1080, in load
    return _jit_compile(
  File "/home/x/miniconda3/envs/stylegan3/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1318, in _jit_compile
    return _import_module_from_library(name, build_directory, is_python_module)
  File "/home/x/miniconda3/envs/stylegan3/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1701, in _import_module_from_library
    module = importlib.util.module_from_spec(spec)
  File "<frozen importlib._bootstrap>", line 565, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1173, in create_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
ImportError: /home/x/.cache/torch_extensions/filtered_lrelu_plugin/2e9606d7cf844ec44b9f500eaacd35c0-nvidia-geforce-rtx-3090/filtered_lrelu_plugin.so: cannot open shared object file: No such file or directory

Expected behavior
Load the chosen pickle file into the visualizer.

Desktop (please complete the following information):

  • OS: Linux Ubuntu 20.04 LTS
  • Python version: 3.9.7
  • PyTorch version: 1.9.1
  • CUDA toolkit version: 11.4
  • NVIDIA driver version: 470.63.01
  • GPU: RTX 3090
  • Docker: No

Training Stability

Hi.

Thanks for the great work.

In terms of training stability, how do you compare stylegan3 to stylegan2-ada-pytorch repo? Cause I'm experiencing sudden, abrupt jumps in FID which I never did when training stylegan2.

Thanks for your response in advance.

utf8bom causes "UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2" (was: Setting up PyTorch plugin "bias_act_plugin"... Failed!)

python gen_images.py --outdir=out --trunc=1 --seeds=2 --network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl
Loading networks from "https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl"...
Generating image for seed 2 (0/1) ...
Setting up PyTorch plugin "bias_act_plugin"... Failed!
Traceback (most recent call last):
File "gen_images.py", line 142, in
generate_images() # pylint: disable=no-value-for-parameter
File "D:\Soft\Miniconda3\lib\site-packages\click\core.py", line 1128, in call
return self.main(*args, **kwargs)
File "D:\Soft\Miniconda3\lib\site-packages\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "D:\Soft\Miniconda3\lib\site-packages\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "D:\Soft\Miniconda3\lib\site-packages\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "gen_images.py", line 134, in generate_images
img = G(z, label, truncation_psi=truncation_psi, noise_mode=noise_mode)
File "D:\Soft\Miniconda3\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "", line 503, in forward
File "D:\Soft\Miniconda3\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "", line 143, in forward
File "D:\Soft\Miniconda3\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "", line 92, in forward
File "D:\AI\stylegan3\torch_utils\ops\bias_act.py", line 84, in bias_act
if impl == 'cuda' and x.device.type == 'cuda' and _init():
File "D:\AI\stylegan3\torch_utils\ops\bias_act.py", line 41, in _init
_plugin = custom_ops.get_plugin(
File "D:\AI\stylegan3\torch_utils\custom_ops.py", line 136, in get_plugin
torch.utils.cpp_extension.load(name=module_name, build_directory=cached_build_dir,
File "D:\Soft\Miniconda3\lib\site-packages\torch\utils\cpp_extension.py", line 1080, in load
return _jit_compile(
File "D:\Soft\Miniconda3\lib\site-packages\torch\utils\cpp_extension.py", line 1263, in _jit_compile
version = JIT_EXTENSION_VERSIONER.bump_version_if_changed(
File "D:\Soft\Miniconda3\lib\site-packages\torch\utils_cpp_extension_versioner.py", line 45, in bump_version_if_changed
hash_value = hash_source_files(hash_value, source_files)
File "D:\Soft\Miniconda3\lib\site-packages\torch\utils_cpp_extension_versioner.py", line 16, in hash_source_files
hash_value = update_hash(hash_value, file.read())
UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2: illegal multibyte sequence

  • OS: [Windows 11]
  • PyTorch version (pytorch 1.9.1)
  • CUDA toolkit version (CUDA 11.4.2)
  • NVIDIA driver version,472.12
  • GPU [RTX a4000]
  • Docker: did you use Docker? no

Attributes must be equal across all images of the dataset

Describe the bug
When trying to train on a dataset I using the following script:

python dataset_tool.py --source=MatrixConversion --dest=~/datasets/-024x1024.zip

I am returned the following:

Error: Image 00000/img00000016.png attributes must be equal across all images of the dataset. Got:
dataset width/cur image width: 1024/1024
dataset height/cur image height: 1024/1024
dataset channels/cur image channels: 3/1

I have successfully made the image and height equal across the dataset using mogrify, but I don't know what to do to make the channels equal as well. Do you have any suggestions on a potential mogrify or convert command or some alternative method to optimize datasets for the dataset_tool.py script?

stuck at Setting up PyTorch plugin "filtered_lrelu_plugin"...

Describe the bug
Have trouble get through Setting up PyTorch plugin "filtered_lrelu_plugin"...
My setup works for stylegan2 but stuck for stylegan3 whenever I do train.py or visualizer.py
However, if I control-C to interrupt, it can bypass this step and use visualizer.
To Reproduce
(stylegan3) C:\Users\fsn20\PycharmProjects\stylegan3>python visualizer.py
Loading "C:\Users\fsn20\PycharmProjects\stylegan3\stylegan3_models\stylegan3-r-metfaces-1024x1024.pkl"... Done.
Setting up PyTorch plugin "bias_act_plugin"... Done.
Setting up PyTorch plugin "filtered_lrelu_plugin"... Failed! (stuck here and I did control-C then it continues as below)

Traceback (most recent call last):
File "C:\Users\fsn20\PycharmProjects\stylegan3\viz\renderer.py", line 136, in render
self._render_impl(res, **args)
File "C:\Users\fsn20\PycharmProjects\stylegan3\viz\renderer.py", line 291, in _render_impl
out, layers = self.run_synthesis_net(G.synthesis, w, capture_layer=layer_name, **synthesis_kwargs)
File "C:\Users\fsn20\PycharmProjects\stylegan3\viz\renderer.py", line 370, in run_synthesis_net
out = net(*args, **kwargs)
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\nn\modules\module.py", line 1071, in _call_impl
result = forward_call(*input, **kwargs)
File "", line 463, in forward
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\nn\modules\module.py", line 1071, in _call_impl
result = forward_call(*input, **kwargs)
File "", line 347, in forward
File "C:\Users\fsn20\PycharmProjects\stylegan3\torch_utils\ops\filtered_lrelu.py", line 114, in filtered_lrelu
if impl == 'cuda' and x.device.type == 'cuda' and _init():
File "C:\Users\fsn20\PycharmProjects\stylegan3\torch_utils\ops\filtered_lrelu.py", line 26, in _init
_plugin = custom_ops.get_plugin(
File "C:\Users\fsn20\PycharmProjects\stylegan3\torch_utils\custom_ops.py", line 136, in get_plugin
torch.utils.cpp_extension.load(name=module_name, build_directory=cached_build_dir,
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1080, in load
return _jit_compile(
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1307, in _jit_compile
baton.wait()
File "C:\Users\fsn20\miniconda3\envs\stylegan3\lib\site-packages\torch\utils\file_baton.py", line 42, in wait
time.sleep(self.wait_seconds)
KeyboardInterrupt

Setting up PyTorch plugin "filtered_lrelu_plugin"... Done. (#at this step, I can actually use the visualizer)

However, if I run the train.py. The error messages are as below.

(stylegan3) C:\Users\fsn20\PycharmProjects\stylegan3>python train.py --outdir=~/training-runs --cfg=stylegan3-t --data=dataset --gpus=2 --batch=16 --gamma=8.2 --mirror=1

Training options:
{
"G_kwargs": {
"class_name": "training.networks_stylegan3.Generator",
"z_dim": 512,
"w_dim": 512,
"mapping_kwargs": {
"num_layers": 2
},
"channel_base": 32768,
"channel_max": 512,
"magnitude_ema_beta": 0.9994456359721023
},
"D_kwargs": {
"class_name": "training.networks_stylegan2.Discriminator",
"block_kwargs": {
"freeze_layers": 0
},
"mapping_kwargs": {},
"epilogue_kwargs": {
"mbstd_group_size": 4
},
"channel_base": 32768,
"channel_max": 512
},
"G_opt_kwargs": {
"class_name": "torch.optim.Adam",
"betas": [
0,
0.99
],
"eps": 1e-08,
"lr": 0.0025
},
"D_opt_kwargs": {
"class_name": "torch.optim.Adam",
"betas": [
0,
0.99
],
"eps": 1e-08,
"lr": 0.002
},
"loss_kwargs": {
"class_name": "training.loss.StyleGAN2Loss",
"r1_gamma": 8.2
},
"data_loader_kwargs": {
"pin_memory": true,
"prefetch_factor": 2,
"num_workers": 3
},
"training_set_kwargs": {
"class_name": "training.dataset.ImageFolderDataset",
"path": "dataset",
"use_labels": false,
"max_size": 92,
"xflip": true,
"resolution": 512,
"random_seed": 0
},
"num_gpus": 2,
"batch_size": 16,
"batch_gpu": 8,
"metrics": [
"fid50k_full"
],
"total_kimg": 25000,
"kimg_per_tick": 4,
"image_snapshot_ticks": 50,
"network_snapshot_ticks": 50,
"random_seed": 0,
"ema_kimg": 5.0,
"augment_kwargs": {
"class_name": "training.augment.AugmentPipe",
"xflip": 1,
"rotate90": 1,
"xint": 1,
"scale": 1,
"rotate": 1,
"aniso": 1,
"xfrac": 1,
"brightness": 1,
"contrast": 1,
"lumaflip": 1,
"hue": 1,
"saturation": 1
},
"ada_target": 0.6,
"run_dir": "~/training-runs\00004-stylegan3-t-dataset-gpus2-batch16-gamma8.2"
}

Output directory: ~/training-runs\00004-stylegan3-t-dataset-gpus2-batch16-gamma8.2
Number of GPUs: 2
Batch size: 16 images
Training duration: 25000 kimg
Dataset path: dataset
Dataset size: 92 images
Dataset resolution: 512
Dataset labels: False
Dataset x-flips: True

Creating output directory...
Launching processes...
Loading training set...

Num images: 184
Image shape: [3, 512, 512]
Label shape: [0]

Constructing networks...
Setting up PyTorch plugin "bias_act_plugin"... Done.
Setting up PyTorch plugin "filtered_lrelu_plugin"... Process SpawnProcess-2:
Traceback (most recent call last):
File "C:\Users\fsn20\miniconda3\envs\sg2\lib\site-packages\torch\multiprocessing\spawn.py", line 19, in _wrap
fn(i, *args)
File "C:\Users\fsn20\PycharmProjects\stylegan3\train.py", line 47, in subprocess_fn
training_loop.training_loop(rank=rank, **c)
File "C:\Users\fsn20\PycharmProjects\stylegan3\training\training_loop.py", line 188, in training_loop
torch.distributed.broadcast(param, src=0)
File "C:\Users\fsn20\miniconda3\envs\sg2\lib\site-packages\torch\distributed\distributed_c10d.py", line 868, in broadcast
work.wait()
RuntimeError: [..\third_party\gloo\gloo\transport\uv\unbound_buffer.cc:67] Timed out waiting 1800000ms for recv operation to complete

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\fsn20\miniconda3\envs\sg2\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "C:\Users\fsn20\miniconda3\envs\sg2\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\fsn20\miniconda3\envs\sg2\lib\site-packages\torch\multiprocessing\spawn.py", line 19, in _wrap
fn(i, *args)
KeyboardInterrupt

Please copy&paste text instead of screenshots for better searchability.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [Windows 10]
  • PyTorch version (pytorch 1.9.0)
  • CUDA toolkit version (e.g., CUDA 11.1.1)
  • NVIDIA driver version (471.41)
  • CUDA version 11.4
  • GPU [RTX 3090]
  • Docker: No

Additional context
(stylegan3) C:\Users\fsn20\PycharmProjects\stylegan3>conda list

packages in environment at C:\Users\fsn20\miniconda3\envs\stylegan3:

Name Version Build Channel

blas 2.112 mkl conda-forge
blas-devel 3.9.0 12_win64_mkl conda-forge
brotlipy 0.7.0 py39hb82d6ee_1001 conda-forge
ca-certificates 2021.10.8 h5b45459_0 conda-forge
certifi 2021.10.8 py39hcbf5309_0 conda-forge
cffi 1.14.6 py39h0878f49_1 conda-forge
chardet 4.0.0 py39hcbf5309_1 conda-forge
charset-normalizer 2.0.0 pyhd8ed1ab_0 conda-forge
click 8.0.3 py39hcbf5309_0 conda-forge
colorama 0.4.4 pyh9f0ad1d_0 conda-forge
cryptography 35.0.0 py39hd8d06c1_0 conda-forge
cudatoolkit 11.1.1 heb2d755_9 conda-forge
cycler 0.10.0 py_2 conda-forge
freetype 2.10.4 h546665d_1 conda-forge
glfw 2.2.0 pypi_0 pypi
icu 68.1 h0e60522_0 conda-forge
idna 3.1 pyhd3deb0d_0 conda-forge
imageio 2.9.0 py_0 conda-forge
imageio-ffmpeg 0.4.3 pypi_0 pypi
imgui 1.3.0 pypi_0 pypi
intel-openmp 2021.4.0 h57928b3_3556 conda-forge
jbig 2.1 h8d14728_2003 conda-forge
jpeg 9d h8ffe710_0 conda-forge
kiwisolver 1.3.2 py39h2e07f2f_0 conda-forge
lcms2 2.12 h2a16943_0 conda-forge
lerc 3.0 h0e60522_0 conda-forge
libblas 3.9.0 12_win64_mkl conda-forge
libcblas 3.9.0 12_win64_mkl conda-forge
libclang 11.1.0 default_h5c34c98_1 conda-forge
libdeflate 1.8 h8ffe710_0 conda-forge
liblapack 3.9.0 12_win64_mkl conda-forge
liblapacke 3.9.0 12_win64_mkl conda-forge
libpng 1.6.37 h1d00b33_2 conda-forge
libtiff 4.3.0 hd413186_2 conda-forge
libuv 1.42.0 h8ffe710_0 conda-forge
libzlib 1.2.11 h8ffe710_1013 conda-forge
lz4-c 1.9.3 h8ffe710_1 conda-forge
m2w64-gcc-libgfortran 5.3.0 6 conda-forge
m2w64-gcc-libs 5.3.0 7 conda-forge
m2w64-gcc-libs-core 5.3.0 7 conda-forge
m2w64-gmp 6.1.0 2 conda-forge
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge
matplotlib 3.4.2 py39hcbf5309_0 conda-forge
matplotlib-base 3.4.2 py39h581301d_0 conda-forge
mkl 2021.4.0 h0e2418a_729 conda-forge
mkl-devel 2021.4.0 h57928b3_730 conda-forge
mkl-include 2021.4.0 h0e2418a_729 conda-forge
msys2-conda-epoch 20160418 1 conda-forge
ninja 1.10.2 h2d74725_1 conda-forge
numpy 1.21.3 py39h6635163_0 conda-forge
olefile 0.46 pyh9f0ad1d_1 conda-forge
openjpeg 2.4.0 hb211442_1 conda-forge
openssl 1.1.1l h8ffe710_0 conda-forge
pillow 8.3.1 py39h916092e_0 conda-forge
pip 21.3.1 pyhd8ed1ab_0 conda-forge
psutil 5.8.0 pypi_0 pypi
pycparser 2.20 pyh9f0ad1d_2 conda-forge
pyopengl 3.1.5 pypi_0 pypi
pyopenssl 21.0.0 pyhd8ed1ab_0 conda-forge
pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge
pyqt 5.12.3 py39hcbf5309_7 conda-forge
pyqt-impl 5.12.3 py39h415ef7b_7 conda-forge
pyqt5-sip 4.19.18 py39h415ef7b_7 conda-forge
pyqtchart 5.12 py39h415ef7b_7 conda-forge
pyqtwebengine 5.12.1 py39h415ef7b_7 conda-forge
pysocks 1.7.1 py39hcbf5309_3 conda-forge
pyspng 0.1.0 pypi_0 pypi
python 3.9.7 h7840368_3_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python_abi 3.9 2_cp39 conda-forge
pytorch 1.9.1 py3.9_cuda11.1_cudnn8_0 pytorch
qt 5.12.9 h5909a2a_4 conda-forge
requests 2.26.0 pyhd8ed1ab_0 conda-forge
scipy 1.7.1 py39hc0c34ad_0 conda-forge
setuptools 58.2.0 py39hcbf5309_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.36.0 h8ffe710_2 conda-forge
tbb 2021.3.0 h2d74725_0 conda-forge
tk 8.6.11 h8ffe710_1 conda-forge
tornado 6.1 py39hb82d6ee_1 conda-forge
tqdm 4.62.2 pyhd8ed1ab_0 conda-forge
typing_extensions 3.10.0.2 pyha770c72_0 conda-forge
tzdata 2021e he74cb21_0 conda-forge
ucrt 10.0.20348.0 h57928b3_0 conda-forge
urllib3 1.26.7 pyhd8ed1ab_0 conda-forge
vc 14.2 hb210afc_5 conda-forge
vs2015_runtime 14.29.30037 h902a5da_5 conda-forge
wheel 0.37.0 pyhd8ed1ab_1 conda-forge
win_inet_pton 1.1.0 py39hcbf5309_2 conda-forge
xz 5.2.5 h62dcd97_1 conda-forge
zlib 1.2.11 h8ffe710_1013 conda-forge
zstd 1.5.0 h6255e5f_0 conda-forge

About feature map visualization

Hi,
If I understand right from reading the code, to visualize the feature maps and get this coordinate feature map visualization, you only pick the first 3 channels of the feature-map and assign rgb values? No dimension reduction or transformation of the feature map is involved?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.