Closed hqnicolas closed 2 years ago
There is no need to change the networks_stylegan3.py
file since this is the official code from NVIDIA.
If you want to load a 256x256 generator, try the following:
checkpoint_path = "/path/to/your/sg3.pt"
decoder = Generator(
z_dim=512,
c_dim=0,
w_dim=512,
img_resolution=res,
img_channels=3,
channel_base=32768,
channel_max=512,
magnitude_ema_beta=0.9988915792636801,
mapping_kwargs={'num_layers': 2}.cuda()
decoder.load_state_dict(torch.load(checkpoint_path), strict=True)
You may have noticed that this is how we load the landscapes
generator which is of resolution 256x256
I am not going to make a fork for this because the current code already supports loading generators of various resolutions.
Based on issue #14 Yuval-Alaluf Restyle Resized to 256x256 Args. Latent 512 I can already guarantee based on the styleGAN2 files that it is not possible to use 8gb GPUs with stylegan3 To help spread this knowledge, I think we could create a Base-Files project with decreased use of vram (12gb). let's start from the ground up with files trained with 256x256 images with args.latent = 512