GaParmar / img2img-turbo

One-step image-to-image with Stable Diffusion turbo: sketch2image, day2night, and more
MIT License
1.67k stars 190 forks source link

Missing Package from requirements.txt #38

Open Night1099 opened 6 months ago

Night1099 commented 6 months ago

default training script for pix2pix-turbo Fails

Traceback (most recent call last): File "/workspace/img2img-turbo/src/train_pix2pix_turbo.py", line 307, in main(args) File "/workspace/img2img-turbo/src/train_pix2pix_turbo.py", line 65, in main import vision_aided_loss ModuleNotFoundError: No module named 'vision_aided_loss' Traceback (most recent call last): File "/usr/local/bin/accelerate", line 8, in sys.exit(main()) File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 46, in main args.func(args) File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 1075, in launch_command simple_launcher(args) File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 681, in simple_launcher raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) subprocess.CalledProcessError: Command '['/usr/bin/python', 'train_pix2pix_turbo.py', '--pretrained_model_name_or_path=stabilityai/sd-turbo', '--output_dir=output/pix2pix_turbo/DiffuseToHeight', '--dataset_folder=data/DiffuseToHeight', '--resolution=512', '--train_batch_size=2', '--enable_xformers_memory_efficient_attention', '--viz_freq', '25', '--track_val_fid', '--report_to', 'wandb', '--tracker_project_name', 'DiffusetoHeight']' returned non-zero exit status 1.

Night1099 commented 6 months ago

turned out to be problem when using torch dynamo

to fix

pip install vision_aided_loss

dont use torch dynamo

HaseongJung commented 3 months ago

But I still get the same error (I didn't use torch dynamo when config eccelerate)

Traceback (most recent call last): File "/mnt/hdd/haseong8012/GAN/img2img-turbo/src/train_cyclegan_turbo.py", line 18, in import vision_aided_loss ModuleNotFoundError: No module named 'vision_aided_loss' Traceback (most recent call last): File "/home/haseong8012/miniconda3/envs/img2img-turbo/bin/accelerate", line 8, in sys.exit(main()) File "/home/haseong8012/miniconda3/envs/img2img-turbo/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 48, in main args.func(args) File "/home/haseong8012/miniconda3/envs/img2img-turbo/lib/python3.10/site-packages/accelerate/commands/launch.py", line 1106, in launch_command simple_launcher(args) File "/home/haseong8012/miniconda3/envs/img2img-turbo/lib/python3.10/site-packages/accelerate/commands/launch.py", line 704, in simple_launcher raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) subprocess.CalledProcessError: Command '['/home/haseong8012/miniconda3/envs/img2img-turbo/bin/python', 'src/train_cyclegan_turbo.py', '--pretrained_model_name_or_path=stabilityai/sd-turbo', '--output_dir=output/cyclegan_turbo/my_horse2zebra', '--dataset_folder', 'data/my_horse2zebra', '--train_img_prep', 'resize_286_randomcrop_256x256_hflip', '--val_img_prep', 'no_resize', '--learning_rate=1e-5', '--max_train_steps=25000', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--report_to', 'wandb', '--tracker_project_name', 'gparmar_unpaired_h2z_cycle_debug_v2', '--enable_xformers_memory_efficient_attention', '--validation_steps', '250', '--lambda_gan', '0.5', '--lambda_idt', '1', '--lambda_cycle', '1']' returned non-zero exit status 1.

GaParmar commented 2 months ago

Does this issue persist if you try install the vision_aided_loss package?