Cannot run on more than one GPU
FollowingTrain a diffusion model, it illustrates that we can set the number of GPUs (default1):Phew, that was quite a bit of code! But you’re finally ready to launch the training withAccelerate’s notebook_launcher function. Pass the function the training loop, all the training arguments, and the number of processes (you can change this value to the number of GPUs available to you) to use for training:from accelerate import notebook_launcher args = (config, model, noise_scheduler, optimizer, train_dataloader, lr_scheduler) notebook_launcher(train_loop, args, num_processes=1)Yet, when I use a VastAI instance withtwoGPUs, and pass2to the function, following error happens:ValueError: To launch a multi-GPU training from your notebook, the `Accelerator` should only be initialized inside your training function. Restart your notebook and make sure no cells initializes an `Accelerator`.
2023-09-27T20:41:53Z
encountered the same err