 torch.nn.DataParallel(pipe.unet, device_ids=[d for d in range(ngpu)])

>>> prompt = "a photo of an astronaut riding a horse on mars"
>>> image = pipe(prompt, parallel=ngpu * batch_per_device, num_inference_steps=1000).images[0]  disable_vae_slicing  < source > ( )    Disable sliced VAE decoding. If enable_vae_slicing was previously enabled, this method will go back to
computing decoding in one step.  disable_vae_tiling  < source > ( )    Disab