Pipe.to("cuda") not working
I’m using latest nvidea studio driversPytorch cuda works on WSL ubuntu however i cannot run pipe.to(“cuda”) with stable difusion.inside jupyterlab cellfrom huggingface_hub import notebook_loginnotebook_login()   #  ←although i enter my key REDACTED_TOKEN…  i cannot verify login is accepteddevice = torch.device(“cuda” if torch.cuda.is_available() else “cpu”)print(device)  # →reports cudain another cellimport torchfrom diffusers import StableDiffusionPipelinefrom PIL import Imagepipe = StableDiffusionPipeline.from_pretrained(“runwayml/stable-diffusion-v1-5”, torch_dtype=torch.float16)   # ←i can see it downloaded the model so login was OK i guesspipe = pipe.to(“cuda”)   # ←kernel time out i got a 3080TX memmory stays low no indication it loadedprompt = “a photo of a cat riding a horse on mars”image = pipe(prompt).images[0]image.show()I have altered the config to perform kernel restart after 10 minutes to wait if it takes longer but this has no effect ( when the kernel dies eventually on the linux prompt i get  AsyncIOLoopKernelRestarter: restarting kernel ) but no other errors on the screen or on the web page of the notebook.
2024-04-27T12:59:15Z
I found there’s an update pipe for parallel computing using GPU, use this to improve it,Original code:pipe.to(“gpu”)Then replace with:pipe.to(device=“cuda”, dtype=torch.float16)