encoder4editing
encoder4editing copied to clipboard
is it possible to fine tune?
Is it possible to fine tune your e4e_ffhq_encode.pt model and change it to another different domain? I have a dataset of babies with a stylegan2 trained. Can I resume a train from your provided weights? i can start a training from scratch but if I add the option to resume from checkpoint it returns the error
Loading decoder weights from pretrained!
Traceback (most recent call last):
File "scripts/train.py", line 87, in
My training config is
python scripts/train.py
--dataset_type babies_encode
--exp_dir new/experiment2/directory
--start_from_latent_avg
--use_w_pool
--w_discriminator_lambda 0.1
--progressive_start 20000
--id_lambda 0.1
--val_interval 10000
--max_steps 200000
--stylegan_size 512
--stylegan_weights ../stylegan2-ada-pytorch_2/network-snapshot-000320.pt
--workers 8
--batch_size 8
--test_batch_size 2
--test_workers 2
--save_interval 2000
--resume_training_from_ckpt pretrained_models/e4e_ffhq_encode.pt
hello, have you solved this promble? I can ues it to fine tune. But the model would be worse after training. My training config is
python scripts/train.py
--dataset_type my_data_encode
--exp_dir my_model/mye4e
--use_w_pool
--w_discriminator_lambda 0.1
--progressive_start 20000
--id_lambda 0.5
--val_interval 10000
--max_steps 200
--stylegan_size 512
--stylegan_weights pretrained_models/stylegan2-ffhq-config-f.pt
--workers 8
--batch_size 16
--test_batch_size 4
--test_workers 4
--checkpoint_path pretrained_models/e4e_ffhq_encode.pt
Hi @juanluisrosaramos, Sorry for the long response time,
In case it is still relevant, it seems like the file_path you provide for the stylegan_weights
leads to a non-existing file, perhaps providing the absolute path to the weights file would help.
Also, just making sure that the StyleGAN checkpoint is compatible with rosinality's stylegan2-pytorch implementation, and not the nvidia's pytorch implementation. Last, I believe that the resume_training_from_ckpt
would not yield the desired effect (there is no training information stored in the checkpoints I provided if thats what stored in pretrained_models/e4e_ffhq_encode.pt
), you could use the --checkpoint_path flag to initialize the encoder from the pretrained weights.
As for @LLLPS666 's question - Is the error caused by the wrong stylegan_size
specified? (512 instead of 1024)?
Best, Omer