jolibrain / joliGEN

Generative AI Image Toolset with GANs and Diffusion for Real-World Applications
https://www.joligen.com
Other
236 stars 31 forks source link

feat(ml): add lambda #661

Open wr0124 opened 2 months ago

wr0124 commented 2 months ago

add function lambda into cm_gan_model

The training works with the following command line

python3 train.py \ --dataroot /data1/juliew/dataset/noglasses2glasses_ffhq \ --checkpoints_dir /data1/juliew/checkpoints \ --name noglasses2glasses_cm_gan \ --config_json examples/example_cm_gan_noglasses2glasses.json \ --gpu_ids 1 \ --D_netDs basic projected_d vision_aided\

The inference works with the following command line

mkdir noglasses2glasses_inference_output cd scripts/ python3 gen_single_image_diffusion.py \ --model_in_file /data1/juliew/checkpoints/noglasses2glasses_cm_gan/latest_net_G_A.pth \ --img_in /data1/juliew/dataset/noglasses2glasses_ffhq/trainA/img/00002.jpg \ --mask_in /data1/juliew/dataset/noglasses2glasses_ffhq/trainA/bbox/00002.jpg \ --dir_out /data1/juliew/cm_gan_lambda/joliGEN/noglasses2glasses_inference_output \ --img_width 128 \ --img_height 128 \

wr0124 commented 2 months ago

I think I do not fully get your idea to "add lambda_gan to self and then to visual_names for it to be plotted." I thought lambda_gan should appear in a separate Visdom window? P.S.: This modification does not display the lambda, and I do not get why use detach here. since in the loss.py , the fake image tensor has already get detached for calculation.