RuntimeError: Expected all tensors to be on the same device

Viewing 2 reply threads
  • Author
    Posts
    • #12633

      Hello Guys,

      I try to create AnimateDiff by using uploaded video.

      I am running python notebook StableDiffusionUI_ngrok_sagiodev.ipynb on Google Colab with T4 GPU.

       

      Somehow, I get the following error.

      RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument weight in method wrapper_CUDA___slow_conv2d_forward)

       

      This happen right after the program call ControlNet .

      2024-02-25 11:20:17,236 – ControlNet – INFO – ControlNet Hooked – Time = 144.2927029132843 0% 0/30 [00:00<?, ?it/s] *** Error completing request

       

      Thanks for your help 🙂

    • #12638
      AvatarAndrew
      Keymaster

        Hi, I tested the notebook with T4 and it seems to work fine. I noticed AnimateDiff is finicky (a known issue).

        This is what I did:

        1. Run notebook with AnimateDiff and ControlNet extensions only
        2. Select Dreamshaper 8 model (SD 1.5)

        3. Enter prompt (“a beautiful girl”)

        4. Upload a video in AnimateDiff (video I used)

        5. Enable AnimateDiff

        6. Enable ContorlNet

        7. Select Openpose Full in controlnet

        8. Generate (Didn’t work. Error message but not the same as yours)

        9. Disable and enable AnimateDiff

        10. Generate (Worked)

        So you can try toggling AnimateDiff to see if that resolves the issue.

      • #12689

        Hello Andrew,

        Thank you very much. It seems works now.

        I will try with different model.

        Phaisit

    Viewing 2 reply threads
    • You must be logged in to reply to this topic.