lshqqytiger / stable-diffusion-webui-amdgpu

Stable Diffusion web UI
GNU Affero General Public License v3.0
1.74k stars 178 forks source link

[Bug]: Virtual machine #54

Open moon47usaco opened 1 year ago

moon47usaco commented 1 year ago

Is there an existing issue for this?

What happened?

Trying to install this over a virtual machine VMware Fusion on my Intel MacBook Pro to try and use the AMD gpu.

I know this is probably a horrible idea but the local install of SD on a Mac can not use the GPU and CPU generation is like trying to download a movie over 56k internet speed. If you did not get that reference or never lived through that, it is gruelingly slow.

I need better than 2min generations... =[

Steps to reproduce the problem

Fallowed std install instructions: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs

What should have happened?

It does not seem to be detecting the GPU.

Commit where the problem happens

Starting Web UI

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

List of extensions

No

Console logs

venv "C:\Users\VM_PC\stable-diffusion-webui-directml\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 41d5450a0a559469b354fd56cac0fe1ab3cf2f40
Installing requirements for Web UI
Launching Web UI with arguments:
Traceback (most recent call last):
  File "C:\Users\VM_PC\stable-diffusion-webui-directml\launch.py", line 349, in <module>
    start()
  File "C:\Users\VM_PC\stable-diffusion-webui-directml\launch.py", line 340, in start
    import webui
  File "C:\Users\VM_PC\stable-diffusion-webui-directml\webui.py", line 31, in <module>
    from modules import extra_networks, ui_extra_networks_checkpoints
  File "C:\Users\VM_PC\stable-diffusion-webui-directml\modules\ui_extra_networks_checkpoints.py", line 5, in <module>
    from modules import shared, ui_extra_networks, sd_models
  File "C:\Users\VM_PC\stable-diffusion-webui-directml\modules\shared.py", line 12, in <module>
    import modules.interrogate
  File "C:\Users\VM_PC\stable-diffusion-webui-directml\modules\interrogate.py", line 15, in <module>
    from modules import devices, paths, shared, lowvram, modelloader, errors
  File "C:\Users\VM_PC\stable-diffusion-webui-directml\modules\devices.py", line 99, in <module>
    dml = torch_directml.device(torch_directml.default_device())
  File "C:\Users\VM_PC\stable-diffusion-webui-directml\venv\lib\site-packages\torch_directml\device.py", line 38, in device
    raise Exception(f"Invalid device_id argument supplied {device_id}. device_id must be in range [0, {num_devices}).")
Exception: Invalid device_id argument supplied 0. device_id must be in range [0, 0).
Press any key to continue . . .

Additional information

No response

lshqqytiger commented 1 year ago

I think it is hard to find examples that run DirectML on VM, but we can try. DirectML requires DirectX 12 Runtime. Make sure your VM has it.

TeutonJon78 commented 1 year ago

You can run dxdiag to see what DirectX version your install is supporting. You also to tell the VM to use the external GPU (and the display needs to be run from the iGPU).

https://docs.vmware.com/en/VMware-Fusion/12/com.vmware.fusion.using.doc/GUID-77ECDE81-57B7-4FBF-B99B-C604C49B4B2C.html

This may also require GPU passthrough support from the CPU/GPU which a laptop level chip might not have.

moon47usaco commented 1 year ago

Thank you, the AMD is a dGPU not an eGPU. I have an Intel iGPU. I will look into the rest and report when I have time to test again.

2400YrsOldLallo commented 6 months ago

Hey all, Has anyone figured this out?