Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Using cpu instead of gpu #561

Open
1 of 6 tasks
TheDarkPharoh opened this issue Nov 4, 2024 · 6 comments
Open
1 of 6 tasks

[Bug]: Using cpu instead of gpu #561

TheDarkPharoh opened this issue Nov 4, 2024 · 6 comments
Labels
invalid This doesn't seem right

Comments

@TheDarkPharoh
Copy link

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

While generating the cpu is being used instead of the gpu

Steps to reproduce the problem

Install webui using zluda following instructions
run webui
check hardware utilization

What should have happened?

It should be using the gpu not the cpu

What browsers do you use to access the UI ?

No response

Sysinfo

I couldnt find the file to download

Console logs

Using VENV: E:\automatic\venv
23:35:40-306823 INFO     Starting SD.Next
23:35:40-309366 INFO     Logger: file="E:\automatic\sdnext.log" level=INFO size=134545 mode=append
23:35:40-310390 INFO     Python: version=3.10.6 platform=Windows bin="E:\automatic\venv\Scripts\python.exe"
                         venv="E:\automatic\venv"
23:35:40-565151 INFO     Version: app=sd.next updated=2024-11-02 hash=65ddc611 branch=master
                         url=https://github.com/vladmandic/automatic/tree/master ui=main
23:35:41-077076 INFO     Platform: arch=AMD64 cpu=AMD64 Family 25 Model 97 Stepping 2, AuthenticAMD system=Windows
                         release=Windows-10-10.0.22631-SP0 python=3.10.6
23:35:41-078612 INFO     Args: []
23:35:41-092843 INFO     CUDA: nVidia toolkit detected
23:35:41-292796 INFO     Verifying requirements
23:35:41-295894 INFO     Verifying packages
23:35:41-352193 INFO     Extensions: disabled=['sdnext-modernui']
23:35:41-353714 INFO     Extensions: enabled=['Lora', 'sd-extension-chainner', 'sd-extension-system-info',
                         'sd-webui-agent-scheduler', 'stable-diffusion-webui-rembg'] extensions-builtin
23:35:41-357808 INFO     Extensions: enabled=['ultimate-upscale-for-automatic1111'] extensions
23:35:41-359332 INFO     Startup: standard
23:35:41-360348 INFO     Verifying submodules
23:35:52-346761 INFO     Extensions enabled: ['Lora', 'sd-extension-chainner', 'sd-extension-system-info',
                         'sd-webui-agent-scheduler', 'stable-diffusion-webui-rembg',
                         'ultimate-upscale-for-automatic1111']
23:35:52-347777 INFO     Verifying requirements
23:35:52-354940 INFO     Command line args: []
23:36:01-245992 INFO     System packages: {'torch': '2.5.1+cu124', 'diffusers': '0.32.0.dev0', 'gradio': '3.43.2',
                         'transformers': '4.46.1', 'accelerate': '1.0.1'}
23:36:02-032136 INFO     Engine: backend=Backend.DIFFUSERS compute=cpu device=cpu attention="Dynamic Attention BMM"
                         mode=no_grad
23:36:02-038767 INFO     Torch parameters: backend=cpu device=cpu config=Auto dtype=torch.bfloat16 vae=torch.bfloat16
                         unet=torch.bfloat16 context=no_grad nohalf=False nohalfvae=False upscast=False
                         deterministic=False test-fp16=True test-bf16=True optimization="Dynamic Attention BMM"
23:36:02-778022 INFO     Device:
23:36:02-998310 INFO     Available VAEs: path="models\VAE" items=0
23:36:02-999847 INFO     Available UNets: path="models\UNET" items=0
23:36:03-000865 INFO     Available TEs: path="models\Text-encoder" items=0
23:36:03-002398 INFO     Disabled extensions: ['sdnext-modernui']
23:36:03-010078 INFO     Available Models: path="models\Stable-diffusion" items=3 time=0.01
23:36:03-190779 INFO     Available Yolo: path="models\yolo" items=6 downloaded=0
23:36:03-277796 INFO     Available LoRAs: path="models\Lora" items=0 folders=2 time=0.00
23:36:04-172628 INFO     Extension: script='extensions-builtin\sd-webui-agent-scheduler\scripts\task_scheduler.py' Using
                         sqlite file: extensions-builtin\sd-webui-agent-scheduler\task_scheduler.sqlite3
23:36:04-215622 INFO     Available Upscalers: items=53 downloaded=2 user=0 time=0.03 types=['None', 'Lanczos',
                         'Nearest', 'ChaiNNer', 'AuraSR', 'ESRGAN', 'LDSR', 'RealESRGAN', 'SCUNet', 'SD', 'SwinIR']
23:36:04-234536 INFO     Available Styles: folder="models\styles" items=288 time=0.02
23:36:04-238083 INFO     UI theme: type=Standard name="black-teal"
23:36:05-057374 INFO     Extension list is empty: refresh required
23:36:06-160112 INFO     Local URL: http://127.0.0.1:7860/
23:36:06-282853 INFO     [AgentScheduler] Task queue is empty
23:36:06-283868 INFO     [AgentScheduler] Registering APIs
23:36:06-367420 INFO     Model metadata saved: file="metadata.json" items=1 time=0.00
23:36:06-369471 INFO     Load model: select="dreamshaper_8 [879db523c3]"
23:36:06-371001 INFO     Autodetect model: detect="Stable Diffusion" class=StableDiffusionPipeline
                         file="E:\automatic\models\Stable-diffusion\dreamshaper_8.safetensors" size=2034MB
Diffusers  4.52it/s ████████ 100% 6/6 00:01 00:00 Loading pipeline components...
23:36:07-868692 INFO     Load network: type=embeddings loaded=0 skipped=0 time=0.00
23:36:08-057594 INFO     Load model: time=1.51 load=1.50 native=512 memory={'ram': {'used': 2.85, 'total': 31.09}}
23:36:08-060134 INFO     Startup time: 15.70 torch=6.94 gradio=1.41 diffusers=0.21 libraries=1.97 samplers=0.07
                         extensions=0.99 detailer=0.18 ui-networks=0.13 ui-txt2img=0.19 ui-img2img=0.07 ui-control=0.11
                         ui-settings=0.23 ui-extensions=0.79 ui-defaults=0.20 launch=0.13 api=0.06 app-started=0.13
                         checkpoint=1.70
23:36:56-396759 INFO     Browser session: user=None client=127.0.0.1 agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64;
                         rv:132.0) Gecko/20100101 Firefox/132.0
23:36:56-420332 INFO     MOTD: N/A
23:37:05-259157 INFO     Base: class=StableDiffusionPipeline
Progress 18.05s/it █████████████████████████████████ 100% 20/20 06:01 00:00 Base
23:43:14-978249 INFO     Save: image="outputs\text\00010-dreamshaper_8-cat.jpg" type=JPEG width=1024 height=1024
                         size=241085
23:43:14-983350 INFO     Processed: images=1 its=0.05 time=369.73 timers={'encode': 0.1, 'args': 0.1, 'pipeline':
                         361.01, 'decode': 8.56, 'post': 0.04} memory={'ram': {'used': 3.48, 'total': 31.09}}

Additional information

Using a ryzen 7800x3d and a radeon 7800xt

@lshqqytiger
Copy link
Owner

  1. Uninstall NVIDIA driver. This repository does not provide backend prioritizing to minimize conflicts with upstream repo.
  2. I can't recognize the commandline argument --use-zluda from your log.

@TheDarkPharoh
Copy link
Author

I uninstalled the nvidia drivers but its still using the cpu. How do i add the commandline argument? There isnt a space in webui.bat to add it

Using python: "C:\Users\esher\AppData\Local\Programs\Python\Python310\python.exe"
Creating VENV: E:\automatic\venv
Using VENV: E:\automatic\venv
08:50:16-286029 INFO Starting SD.Next
08:50:16-288029 INFO Logger: file="E:\automatic\sdnext.log" level=INFO size=164260 mode=append
08:50:16-289028 INFO Python: version=3.10.6 platform=Windows bin="E:\automatic\venv\Scripts\python.exe"
venv="E:\automatic\venv"
08:50:16-532717 INFO Version: app=sd.next updated=2024-11-02 hash=65ddc611 branch=master
url=https://github.com/vladmandic/automatic/tree/master ui=main
08:50:16-968200 INFO Platform: arch=AMD64 cpu=AMD64 Family 25 Model 97 Stepping 2, AuthenticAMD system=Windows
release=Windows-10-10.0.22631-SP0 python=3.10.6
08:50:16-970997 INFO Args: []
08:50:17-009197 INFO Python: version=3.10.6 platform=Windows bin="E:\automatic\venv\Scripts\python.exe"
venv="E:\automatic\venv"
08:50:17-012196 INFO OpenVINO: selected
08:50:17-013196 INFO Install: package="openvino==2024.3.0" mode=pip
08:50:34-608042 INFO Install: package="onnxruntime-openvino" mode=pip
08:51:03-309006 INFO Install: package="nncf==2.12.0" mode=pip
08:52:18-640808 INFO Install: package="torch==2.3.1+cpu torchvision==0.18.1+cpu --index-url
https://download.pytorch.org/whl/cpu" mode=pip
08:53:48-255447 INFO Install: package="onnx" mode=pip
08:54:27-283800 INFO Install: package="onnxruntime" mode=pip
08:54:59-688432 INFO Installing requirements: this may take a while...
08:57:04-952206 INFO Verifying requirements
08:57:05-066070 INFO Install: package="requests==2.32.3" mode=pip
08:57:06-902587 INFO Verifying packages
08:57:06-903607 INFO Install: package="git+https://github.com/openai/CLIP.git" mode=pip
08:57:12-587329 INFO Install: package="open-clip-torch" mode=pip
08:57:14-442789 INFO Startup: standard
08:57:14-443791 INFO Verifying submodules
08:57:24-337243 INFO Extension installed packages: sd-webui-agent-scheduler ['SQLAlchemy==2.0.36',
'greenlet==3.1.1']
08:57:32-192751 INFO Extension installed packages: stable-diffusion-webui-rembg ['PyMatting==1.1.12',
'opencv-python-headless==4.10.0.84', 'pooch==1.8.2', 'rembg==2.0.59']
08:57:32-251751 INFO Extensions enabled: ['Lora', 'sd-extension-chainner', 'sd-extension-system-info',
'sd-webui-agent-scheduler', 'stable-diffusion-webui-rembg',
'ultimate-upscale-for-automatic1111']
08:57:32-253351 INFO Installing requirements: this may take a while...
08:57:32-254356 INFO Verifying requirements
08:57:32-264200 INFO Command line args: []
08:57:52-420177 INFO System packages: {'torch': '2.3.1+cpu', 'diffusers': '0.32.0.dev0', 'gradio': '3.43.2',
'transformers': '4.46.1', 'accelerate': '1.0.1'}
08:57:53-916689 INFO Engine: backend=Backend.DIFFUSERS compute=cpu device=cpu attention="Dynamic Attention BMM"
mode=no_grad
08:57:53-926687 INFO Torch parameters: backend=cpu device=cpu config=Auto dtype=torch.bfloat16 vae=torch.bfloat16
unet=torch.bfloat16 context=no_grad nohalf=False nohalfvae=False upscast=False
deterministic=False test-fp16=True test-bf16=True optimization="Dynamic Attention BMM"
08:57:53-927689 INFO Device:
08:57:55-743258 INFO Available VAEs: path="models\VAE" items=0
08:57:55-744258 INFO Available UNets: path="models\UNET" items=0
08:57:55-746258 INFO Available TEs: path="models\Text-encoder" items=0
08:57:55-747258 INFO Disabled extensions: ['sdnext-modernui']
08:57:55-754258 INFO Available Models: path="models\Stable-diffusion" items=3 time=0.01
08:57:55-766258 INFO Install: package="basicsr" mode=pip
08:58:04-016031 INFO Install: package="gfpgan" mode=pip
08:58:07-499882 INFO Available Yolo: path="models\yolo" items=6 downloaded=0
08:58:07-968882 INFO Available LoRAs: path="models\Lora" items=0 folders=2 time=0.00
08:58:09-414203 INFO Extension: script='extensions-builtin\sd-webui-agent-scheduler\scripts\task_scheduler.py' Using
sqlite file: extensions-builtin\sd-webui-agent-scheduler\task_scheduler.sqlite3
08:58:09-528208 INFO Available Upscalers: items=53 downloaded=2 user=0 time=0.10 types=['None', 'Lanczos',
'Nearest', 'ChaiNNer', 'AuraSR', 'ESRGAN', 'LDSR', 'RealESRGAN', 'SCUNet', 'SD', 'SwinIR']
08:58:10-630712 INFO Available Styles: folder="models\styles" items=288 time=1.10
08:58:10-690713 INFO UI theme: type=Standard name="black-teal"
08:58:10-794713 INFO Install: package="clean-fid" mode=pip
08:58:13-935259 INFO Extension list is empty: refresh required
08:58:15-002776 INFO Local URL: http://127.0.0.1:7860/
INFO:nncf:NNCF initialized successfully. Supported frameworks detected: torch, onnx, openvino
08:58:18-031306 WARNING OpenVINO: No compatible GPU detected! Using CPU
08:58:18-089309 INFO [AgentScheduler] Task queue is empty
08:58:18-090306 INFO [AgentScheduler] Registering APIs
08:58:18-345308 INFO Load model: select="dreamshaper_8 [879db523c3]"
08:58:18-346602 INFO Autodetect model: detect="Stable Diffusion" class=StableDiffusionPipeline
file="E:\automatic\models\Stable-diffusion\dreamshaper_8.safetensors" size=2034MB
Diffusers 1.09s/it ████████ 100% 6/6 00:06 00:00 Loading pipeline components...
08:58:25-203588 INFO Load network: type=embeddings loaded=0 skipped=0 time=0.00
08:58:25-601144 INFO Load model: time=7.08 load=6.86 move=0.21 native=512 memory={'ram': {'used': 2.7, 'total':
31.09}}
08:58:25-603453 INFO Startup time: 53.29 torch=14.43 gradio=4.03 diffusers=0.53 libraries=4.20 samplers=0.20
extensions=1.93 detailer=11.75 upscalers=0.10 networks=1.16 ui-networks=0.16 ui-txt2img=2.25
ui-img2img=0.06 ui-control=0.11 ui-settings=0.55 ui-extensions=0.70 ui-defaults=0.19
launch=0.20 api=0.06 app-started=3.28 checkpoint=7.26
09:16:04-761190 INFO Browser session: user=None client=127.0.0.1 agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64;
rv:132.0) Gecko/20100101 Firefox/132.0
09:16:04-887013 INFO MOTD: N/A
09:16:10-911136 INFO Base: class=StableDiffusionPipeline
Progress 45.19s/it █████████████████████████████████ 100% 20/20 15:03 00:00 Base
09:31:27-973096 INFO Save: image="outputs\text\00011-dreamshaper_8-cat.jpg" type=JPEG width=1024 height=1024
size=240406
09:31:27-978097 INFO Processed: images=1 its=0.02 time=917.09 timers={'prepare': 0.03, 'encode': 0.84, 'args': 1.06,
'pipeline': 903.87, 'decode': 12.1, 'post': 0.04} memory={'ram': {'used': 3.32, 'total':
31.09}}

@lshqqytiger
Copy link
Owner

You can add arguments in webui-user.bat.

@lshqqytiger lshqqytiger added question Further information is requested zluda About ZLUDA navi labels Nov 4, 2024
@TheDarkPharoh
Copy link
Author

There is no webui-user.bat file only a webui.bat

@TheDarkPharoh
Copy link
Author

Ok I found the webui-user.bat file and added the zluda argument. It gave me this. There is an openvino warning about not being able to find a gpu and so its using a cpu insstead

Using python: "C:\Users\esher\AppData\Local\Programs\Python\Python310\python.exe"
Creating VENV: E:\automatic\venv
Using VENV: E:\automatic\venv
16:32:48-708219 INFO Starting SD.Next
16:32:48-709662 INFO Logger: file="E:\automatic\sdnext.log" level=INFO size=227543 mode=append
16:32:48-711672 INFO Python: version=3.10.6 platform=Windows bin="E:\automatic\venv\Scripts\python.exe"
venv="E:\automatic\venv"
16:32:48-935098 INFO Version: app=sd.next updated=2024-11-02 hash=65ddc611 branch=master
url=https://github.com/vladmandic/automatic/tree/master ui=main
16:32:49-428336 INFO Platform: arch=AMD64 cpu=AMD64 Family 25 Model 97 Stepping 2, AuthenticAMD system=Windows
release=Windows-10-10.0.22631-SP0 python=3.10.6
16:32:49-429336 INFO Args: ['--use-zluda']
16:32:49-444843 INFO Python: version=3.10.6 platform=Windows bin="E:\automatic\venv\Scripts\python.exe"
venv="E:\automatic\venv"
16:32:49-447843 INFO OpenVINO: selected
16:32:49-449843 INFO Install: package="openvino==2024.3.0" mode=pip
16:33:01-655128 INFO Install: package="onnxruntime-openvino" mode=pip
16:33:24-392285 INFO Install: package="nncf==2.12.0" mode=pip
16:34:22-938382 INFO Install: package="torch==2.3.1+cpu torchvision==0.18.1+cpu --index-url
https://download.pytorch.org/whl/cpu" mode=pip
16:35:43-252486 INFO Install: package="onnx" mode=pip
16:36:21-799687 INFO Install: package="onnxruntime" mode=pip
16:36:53-150918 INFO Installing requirements: this may take a while...
16:38:28-194457 INFO Verifying requirements
16:38:28-310970 INFO Install: package="requests==2.32.3" mode=pip
16:38:30-084613 INFO Verifying packages
16:38:30-085614 INFO Install: package="git+https://github.com/openai/CLIP.git" mode=pip
16:38:35-609680 INFO Install: package="open-clip-torch" mode=pip
16:38:37-387096 INFO Startup: standard
16:38:37-388097 INFO Verifying submodules
16:38:46-290449 INFO Extension installed packages: sd-webui-agent-scheduler ['SQLAlchemy==2.0.36',
'greenlet==3.1.1']
16:38:53-962988 INFO Extension installed packages: stable-diffusion-webui-rembg ['PyMatting==1.1.12',
'opencv-python-headless==4.10.0.84', 'pooch==1.8.2', 'rembg==2.0.59']
16:38:54-023011 INFO Extensions enabled: ['Lora', 'sd-extension-chainner', 'sd-extension-system-info',
'sd-webui-agent-scheduler', 'stable-diffusion-webui-rembg',
'ultimate-upscale-for-automatic1111']
16:38:54-024011 INFO Installing requirements: this may take a while...
16:38:54-024011 INFO Verifying requirements
16:38:54-031013 INFO Command line args: ['--use-zluda'] use_zluda=True
16:39:09-797027 INFO System packages: {'torch': '2.3.1+cpu', 'diffusers': '0.32.0.dev0', 'gradio': '3.43.2',
'transformers': '4.46.1', 'accelerate': '1.0.1'}
16:39:11-033373 INFO Engine: backend=Backend.DIFFUSERS compute=cpu device=cpu attention="Dynamic Attention BMM"
mode=no_grad
16:39:11-036374 INFO Torch parameters: backend=cpu device=cpu config=Auto dtype=torch.bfloat16 vae=torch.bfloat16
unet=torch.bfloat16 context=no_grad nohalf=False nohalfvae=False upscast=False
deterministic=False test-fp16=True test-bf16=True optimization="Dynamic Attention BMM"
16:39:11-038373 INFO Device:
16:39:12-422709 INFO Available VAEs: path="models\VAE" items=0
16:39:12-423709 INFO Available UNets: path="models\UNET" items=0
16:39:12-424709 INFO Available TEs: path="models\Text-encoder" items=0
16:39:12-426708 INFO Disabled extensions: ['sdnext-modernui']
16:39:12-431141 INFO Available Models: path="models\Stable-diffusion" items=3 time=0.00
16:39:12-434141 INFO Install: package="basicsr" mode=pip
16:39:19-737968 INFO Install: package="gfpgan" mode=pip
16:39:23-051249 INFO Available Yolo: path="models\yolo" items=6 downloaded=0
16:39:23-135259 INFO Available LoRAs: path="models\Lora" items=0 folders=2 time=0.00
16:39:23-715106 INFO Extension: script='extensions-builtin\sd-webui-agent-scheduler\scripts\task_scheduler.py' Using
sqlite file: extensions-builtin\sd-webui-agent-scheduler\task_scheduler.sqlite3
16:39:23-739067 INFO Available Upscalers: items=53 downloaded=2 user=0 time=0.02 types=['None', 'Lanczos',
'Nearest', 'ChaiNNer', 'AuraSR', 'ESRGAN', 'LDSR', 'RealESRGAN', 'SCUNet', 'SD', 'SwinIR']
16:39:23-757073 INFO Available Styles: folder="models\styles" items=288 time=0.02
16:39:23-761075 INFO UI theme: type=Standard name="black-teal"
16:39:23-844551 INFO Install: package="clean-fid" mode=pip
16:39:26-437720 INFO Extension list is empty: refresh required
16:39:27-442259 INFO Local URL: http://127.0.0.1:7860/
INFO:nncf:NNCF initialized successfully. Supported frameworks detected: torch, onnx, openvino
16:39:30-059505 WARNING OpenVINO: No compatible GPU detected! Using CPU
16:39:30-116212 INFO [AgentScheduler] Task queue is empty
16:39:30-116781 INFO [AgentScheduler] Registering APIs
16:39:30-350815 INFO Load model: select="dreamshaper_8 [879db523c3]"
16:39:30-352376 INFO Autodetect model: detect="Stable Diffusion" class=StableDiffusionPipeline
file="E:\automatic\models\Stable-diffusion\dreamshaper_8.safetensors" size=2034MB
Diffusers 5.99it/s ████████ 100% 6/6 00:01 00:00 Loading pipeline components...
16:39:31-494227 INFO Load network: type=embeddings loaded=0 skipped=0 time=0.00
16:39:31-698252 INFO Load model: time=1.18 load=1.14 native=512 memory={'ram': {'used': 2.7, 'total': 31.09}}
16:39:31-701763 INFO Startup time: 37.67 torch=11.24 gradio=3.70 diffusers=0.36 libraries=3.04 extensions=0.67
detailer=10.62 ui-networks=0.12 ui-txt2img=2.00 ui-img2img=0.06 ui-control=0.11
ui-settings=0.29 ui-extensions=0.69 ui-defaults=0.19 launch=0.14 api=0.06 app-started=2.85
checkpoint=1.35

@lshqqytiger
Copy link
Owner

Try --reinstall-torch.
Also, it is SD.Next, not stable-diffusion-webui-amdgpu. You'd better to ask for help at SD.Next community. (maybe discord)

@lshqqytiger lshqqytiger added invalid This doesn't seem right and removed question Further information is requested zluda About ZLUDA navi labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants