[Q&A]: Fooocus is very slow on AMD #3854
-
Checklist
What happened?Hello, I just installed Fooocus, and its execution is particularly slow: it takes over 10 minutes to generate an image in 'Extremely fast' mode, and in 'Fast' mode, I waited more than 30 minutes, and the image was still not generated. I’m running Windows 11 with 32 GB of RAM and this processor: AMD Ryzen 7 7735U with Radeon Graphics. I have adjusted the run.bat file to make it compatible with AMD. It seems impossible to use the software under these conditions. My PC is fairly new and quite powerful. How can this issue be resolved? I couldn’t find any solutions in the documentation. Thank you very much Steps to reproduce the problemVery slow What should have happened?Very slow What browsers do you use to access Fooocus?No response Where are you running Fooocus?None What operating system are you using?Windows 11 Console logsC:\Users\mathi\Downloads\Fooocus_win64_2-5-0\Fooocus_win64_2-5-0>.\python_embeded\python.exe -m pip uninstall torch torchvision torchaudio torchtext functorch xformers -y
Found existing installation: torch 2.4.1
Uninstalling torch-2.4.1:
Successfully uninstalled torch-2.4.1
Found existing installation: torchvision 0.19.1
Uninstalling torchvision-0.19.1:
Successfully uninstalled torchvision-0.19.1
WARNING: Skipping torchaudio as it is not installed.
WARNING: Skipping torchtext as it is not installed.
WARNING: Skipping functorch as it is not installed.
WARNING: Skipping xformers as it is not installed.
C:\Users\mathi\Downloads\Fooocus_win64_2-5-0\Fooocus_win64_2-5-0>.\python_embeded\python.exe -m pip install torch-directml
Requirement already satisfied: torch-directml in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (0.2.5.dev240914)
Collecting torch==2.4.1 (from torch-directml)
Using cached torch-2.4.1-cp310-cp310-win_amd64.whl.metadata (27 kB)
Collecting torchvision==0.19.1 (from torch-directml)
Using cached torchvision-0.19.1-cp310-cp310-win_amd64.whl.metadata (6.1 kB)
Requirement already satisfied: filelock in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from torch==2.4.1->torch-directml) (3.12.2)
Requirement already satisfied: typing-extensions>=4.8.0 in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from torch==2.4.1->torch-directml) (4.12.2)
Requirement already satisfied: sympy in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from torch==2.4.1->torch-directml) (1.12)
Requirement already satisfied: networkx in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from torch==2.4.1->torch-directml) (3.1)
Requirement already satisfied: jinja2 in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from torch==2.4.1->torch-directml) (3.1.2)
Requirement already satisfied: fsspec in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from torch==2.4.1->torch-directml) (2023.6.0)
Requirement already satisfied: numpy in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from torchvision==0.19.1->torch-directml) (1.26.4)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from torchvision==0.19.1->torch-directml) (10.4.0)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from jinja2->torch==2.4.1->torch-directml) (2.1.3)
Requirement already satisfied: mpmath>=0.19 in c:\users\mathi\downloads\fooocus_win64_2-5-0\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from sympy->torch==2.4.1->torch-directml) (1.3.0)
Using cached torch-2.4.1-cp310-cp310-win_amd64.whl (199.4 MB)
Using cached torchvision-0.19.1-cp310-cp310-win_amd64.whl (1.3 MB)
Installing collected packages: torch, torchvision
WARNING: The scripts convert-caffe2-to-onnx.exe, convert-onnx-to-caffe2.exe and torchrun.exe are installed in 'C:\Users\mathi\Downloads\Fooocus_win64_2-5-0\Fooocus_win64_2-5-0\python_embeded\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed torch-2.4.1 torchvision-0.19.1
[notice] A new release of pip is available: 24.1.2 -> 24.3.1
[notice] To update, run: C:\Users\mathi\Downloads\Fooocus_win64_2-5-0\Fooocus_win64_2-5-0\python_embeded\python.exe -m pip install --upgrade pip
C:\Users\mathi\Downloads\Fooocus_win64_2-5-0\Fooocus_win64_2-5-0>.\python_embeded\python.exe -s Fooocus\entry_with_update.py --directml
Already up-to-date
Update succeeded.
[System ARGV] ['Fooocus\\entry_with_update.py', '--directml']
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Fooocus version: 2.5.5
[Cleanup] Attempting to delete content of temp dir C:\Users\mathi\AppData\Local\Temp\fooocus
[Cleanup] Cleanup successful
Using directml with device:
Total VRAM 1024 MB, total RAM 31998 MB
Set vram state to: NORMAL_VRAM
Always offload VRAM
Device: privateuseone
VAE dtype: torch.float32
Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --attention-split
Refiner unloaded.
Running on local URL: http://127.0.0.1:7865
To create a public link, set `share=True` in `launch()`.
IMPORTANT: You are using gradio version 3.41.2, however version 4.44.1 is available, please upgrade.
--------
model_type EPS
UNet ADM Dimension 2816
Using split attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using split attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection'}
left over keys: dict_keys(['cond_stage_model.clip_l.transformer.text_model.embeddings.position_ids'])
Base model loaded: C:\Users\mathi\Downloads\Fooocus_win64_2-5-0\Fooocus_win64_2-5-0\Fooocus\models\checkpoints\juggernautXL_v8Rundiffusion.safetensors
VAE loaded: None
Request to load LoRAs [('sd_xl_offset_example-lora_1.0.safetensors', 0.1)] for model [C:\Users\mathi\Downloads\Fooocus_win64_2-5-0\Fooocus_win64_2-5-0\Fooocus\models\checkpoints\juggernautXL_v8Rundiffusion.safetensors].
Loaded LoRA [C:\Users\mathi\Downloads\Fooocus_win64_2-5-0\Fooocus_win64_2-5-0\Fooocus\models\loras\sd_xl_offset_example-lora_1.0.safetensors] for UNet [C:\Users\mathi\Downloads\Fooocus_win64_2-5-0\Fooocus_win64_2-5-0\Fooocus\models\checkpoints\juggernautXL_v8Rundiffusion.safetensors] with 788 keys at weight 0.1.
Fooocus V2 Expansion: Vocab with 642 words.
Fooocus Expansion engine loaded for cpu, use_fp16 = False.
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
Started worker with PID 17484
App started successful. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865 Additional informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Sounds about right on that CPU. AMD is not for AI and only flagships barely scrape what low tier NVidia cards can do. Grab an NVidia GPU for further AI pursuits. |
Beta Was this translation helpful? Give feedback.
-
Ok, I see, that’s really unfortunate... I do have an old PC (very old) with an Nvidia card, but it doesn’t seem like a better option, which doesn’t surprise me. Do you know of a good cloud platform to set up a VM with an Nvidia card at a reasonable cost? Thanks |
Beta Was this translation helpful? Give feedback.
-
@freelancer2000 @Mathis069 fyi converted to discussion in "Q&A" topic as this is no bug. |
Beta Was this translation helpful? Give feedback.
Sounds about right on that CPU. AMD is not for AI and only flagships barely scrape what low tier NVidia cards can do. Grab an NVidia GPU for further AI pursuits.