Open JeSuisSurGithub opened 6 months ago
@MythicalChu
Add --directml ^.
What is that ^ at the end? Shouldn't it be just --directml or what?
@SquidPuffer
`Add --directml ^
What is that ^ at the end? Shouldn't it be just --directml or what?
You can use "^" as new line. The below COMMANDLINE_ARGS works for me btw. For example.
set COMMANDLINE_ARGS=--directml ^
--skip-torch-cuda-test ^
--always-normal-vram
@MythicalChu
comment out all the @torch.inference_mode() (add # before them) on: \ldm_patched\modules\utils.py - line 407 \modules_forge\forge_loader.py - line 236, line 242
change "with torch.inference_mode():" for "with torch.no_grad():" on: \modules\processing.py - line 817
Thanks for this, it kinda works... But the problem is...with my ryzen7735hs and 4gb 680m integrated, it eats all of VRAM and lots of RAM and freezes. So its not working in lowvram mode at all. BTW in standard automatic111 everything works fine in low vram mode. But ppl say forge is faster, so i wanted to give a try... I have another PC with nvidia 1050ti 4gb, and it works perfectly without changing anything, because it manages VRAM very good, i can even watch youtube or whatever, while generating.
U know how to help me guys?
Problem with ryzen 7840HS ( 780M integrated, 8gb allocated).
Error : DML allocator out of memory!
For me it says it detected 1024mb cram while i have the RX580 which has 8gb. I suspected that's why it generates images slow too because it doesn't use all of the GPU and is way slower than automatic1111. Any fix for that?
Currently Forge have issue with memory leaks.
@MythicalChu Change checkpoints and VAEs Disabling Japanese language extensions Add --directml ^. Reinstalling webui-forge I have tried all of these and get the same error.
Hmmm what is the cause?
Have tested these settings on a 5500 xt (4GB VRAM, 32GB RAM). Windows allocate a total of 16gb of RAM to vram. Forge just quits stating DML ran out of memory. 1111 on Direct-ML runs pretty flawless.
RuntimeError: Device type privateuseone is not supported for torch.Generator() api. RuntimeError: 'devices' argument must be DML (in cmd) i did all steps but I have this error, I have no idea why
Sounds like you forgot to change seed generation to cpu on the settings, torch.Generator() crashes if it tries that with Directml. This is the config: (it should be the only that shows if you type "cpu" on the search box of the Settings Tab) Random number generator source. (changes seeds drastically; use CPU to produce the same picture across different videocard vendors; use NV to produce same picture as on NVidia videocards) []GPU [o]CPU []NV
still not working now i have TypeError: 'NoneType' object is not iterable
If you switch form SD to SDTurbo or SD to SDXL or SDXL to other..you will get this error. To fix...restart PC. But do not change to other types. You can change 1.5 to 1.5 model however changing models like 1.5 to 2.0 or SDXL or turbo will brick it. So keep that in mind. You are safe to use Loras, But when changing Models makes sure you know what model you are switching. My suggestion same models can be in sub directory as "SD 1.5" that is base model And SDXL for other Like "SD1.5/Dreamshaper.safetensors" is folder is SD1.5...model is dreamshaper. You can orginize better folder and models this way. I hope it helps.
the best part about it i used 1.5 model from the beginning and restarting pc didnt help
edit these files? And did you set Random Number Generator Form GPU to CPU? comment out all the @torch.inference_mode() (add # before them) on: \ldm_patched\modules\utils.py - line 407 \modules_forge\forge_loader.py - line 236, line 242 change "with torch.inference_mode():" for "with torch.no_grad():" on: \modules\processing.py - line 817
its working now ty
Como hiciste bro? el de modificar el primero ese que es utilz.py?No entendi bien
Yes, recent changes broke more things for Directml, I've mentioned them, and a workaround for us, here: #73
That works for ipadapter I was the original op on ipadapter github and still changing that line on every update, how does it help here ? Are there similar lines to change on forge itself ?
Read the rest of my msgs, the last one mentions all the files/lines you need to change. Well, I'll detail them again here anyway... comment out all the @torch.inference_mode() (add # before them) on: \ldm_patched\modules\utils.py - line 407 \modules_forge\forge_loader.py - line 236, line 242 change "with torch.inference_mode():" for "with torch.no_grad():" on: \modules\processing.py - line 817 This fixes normal execution and Tiled Vae Decoding for us. I'm running it with similar performance I get on ComfyUI, which is the fastest It has worked on my rx580 8Gb (windows), despite it saying "low_vram mode" here.
HOLY ... Just changed all those files, and regarding tiled-vae , yes after using it on my workflows no more out of memory again even on sdxl.
Edit : Yes sd1.5 and sdxl working, tiled-vae auto enabling and working also. But the speed seems identical to comfyui and fooocus.
Edit 2: Talked too early, sd1.5 models and sdxl turbo worked, when I tried a standard sdxl (juggernaught8) none type error came back again. If I restart PC , I can load and use full sdxl models without error, only if I change from sd1.5 or sdxl turbo to sdxl none... error returns and persists until pc restarts.
Ayudame porfa bro yo no puedo ya modifique hice lo del tutorial que deja el vago pero igual me dice TypeError: 'NoneType' object is not iterable
Checklist
What happened?
Tried to launch webui through webui-user.bat and it can't. Seems like torch_directml doesn't get installed and that the program supposes that i'm using a cuda compatible gpu.
Steps to reproduce the problem
--directml --skip-torch-cuda-test
to COMMANDLINE_ARGS in webui-user.batWhat should have happened?
It should have launched the UI.
What browsers do you use to access the UI ?
Mozilla Firefox
Sysinfo
I couldn't get the sysinfo dump either
Additional information
The DirectML fork of a1111 webui works fine on my AMD Ryzen 3500U Vega 8 laptop APU (2x4GB 2400MHz).