-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
AMD Segmentation Fault #1288
Comments
got exactly the same on RX5700XT
|
Same fault, core dumped 5700XT |
Same here, followed #1079 successfully. However I'm using Radeon graphics with my R7 pro 5850U. Tried with and without Ubuntu 22.04.3, 6.1.66
|
Pretty much exactly how mine shakes out after the big string of adjectives
then core dump. I also have the same exact thing on my integrated R5 laptop
and my 5700xt desktop :/
…On Sun, 10 Dec 2023, 14:19 L226, ***@***.***> wrote:
Same here, followed #1079
<#1079> successfully.
However I'm using Radeon graphics with my R7 pro 5850U. Tried with and
without --use-split-cross-attention
Ubuntu 22.04.3, 6.1.66
AMD Ryzen 7 Pro 5850U
AMD Radeon Graphics
48 GB RAM
python entry_with_update.py --preset realistic --use-split-cross-attention
Update failed.
authentication required but no callback set
Update succeeded.
[System ARGV] ['entry_with_update.py', '--preset', 'realistic', '--use-split-cross-attention']
Loaded preset: /home/user/genai/Fooocus/presets/realistic.json
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Fooocus version: 2.1.824
Running on local URL: http://127.0.0.1:7866
To create a public link, set `share=True` in `launch()`.
Total VRAM 4096 MB, total RAM 43960 MB
Trying to enable lowvram mode because your GPU seems to have 4GB or less. If you don't want this use: --normalvram
Set vram state to: LOW_VRAM
Disabling smart memory management
Device: cuda:0 AMD Radeon Graphics : native
VAE dtype: torch.float32
Using split optimization for cross attention
Refiner unloaded.
model_type EPS
adm 2816
Using split attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using split attention in VAE
extra keys {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}
Base model loaded: /home/user/genai/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors
Request to load LoRAs [['SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors', 0.25], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [/home/user/genai/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors].
Loaded LoRA [/home/user/genai/Fooocus/models/loras/SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for UNet [/home/user/genai/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors] with 788 keys at weight 0.25.
Loaded LoRA [/home/user/genai/Fooocus/models/loras/SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for CLIP [/home/user/genai/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors] with 264 keys at weight 0.25.
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
[Fooocus Model Management] Moving model(s) has taken 2.21 seconds
App started successful. Use the app with http://127.0.0.1:7866/ or 127.0.0.1:7866
[Parameters] Adaptive CFG = 7
[Parameters] Sharpness = 2
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 3.0
[Parameters] Seed = 6293613909801716834
[Parameters] Sampler = dpmpp_2m_sde_gpu - karras
[Parameters] Steps = 30 - 15
[Fooocus] Initializing ...
[Fooocus] Loading models ...
Refiner unloaded.
[Fooocus] Processing prompts ...
[Fooocus] Preparing Fooocus text #1 ...
[Prompt Expansion] ship on fire, dramatic, intricate, elegant, highly detailed, extremely new, professional, cinematic, artistic, sharp focus, color light, winning, romantic, smart, cute, epic, creative, cool, loving, attractive, pretty, charming, complex, amazing, passionate, charismatic, colorful, coherent, iconic, fine, vibrant, incredible, beautiful, awesome, pure
[Fooocus] Preparing Fooocus text #2 ...
[Prompt Expansion] ship on fire, full color, cinematic, stunning, highly detailed, formal, serious, determined, elegant, professional, artistic, emotional, pretty, attractive, smart, charming, best, dramatic, sharp focus, beautiful, cute, modern, futuristic, surreal, iconic, fine detail, colorful, ambient light, dynamic, amazing, symmetry, intricate, elite, magical
[Fooocus] Encoding positive #1 ...
[Fooocus] Encoding positive #2 ...
[Fooocus] Encoding negative #1 ...
[Fooocus] Encoding negative #2 ...
[Parameters] Denoising Strength = 1.0
[Parameters] Initial Latent shape: Image Space (1152, 896)
Preparation time: 8.59 seconds
[Sampler] refiner_swap_method = joint
[Sampler] sigma_min = 0.0291671771556139, sigma_max = 14.614643096923828
Segmentation fault (core dumped)
—
Reply to this email directly, view it on GitHub
<#1288 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4TKOCAYQQZYW7FFJRJ6QE3YIXAHFAVCNFSM6AAAAABAM5PT3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYHE3TQNBZGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm running mint linux fully update and all. |
This has been published by lllyasviel: |
I have the same issue. Running arch and I have a RX 6750 XT, 32GB ram and 40GB swap
All I get to see in the browser is 'Waiting for task to start ...' |
|
Tried increasing swapfile (in my case - disabling existing 1G swap partition and creating /activating new 40G swap file) with cache pressure = 100, swappiness = 60), still segfaults:
Looking at swap usage it didn't really use anything, also RAM util looked pretty low. Running strace on the process showed some funny lookups, so I guess the AMD integration still needs work or I need to re-install some packages; e.g.
I will try to look more deeply into it after the break |
Getting segfault as well. I don't think it's a RAM issue (128GB).
|
Also getting segmentation fault: |
Got segfaults as well, but managed to fix it. Here is what I found: With
After trying
After finding ROCm/ROCm#2536 and trying Using For debugging the output of I guess #627 is related. Hope this helps. |
After reinstalling the dependencies today, I can run this without needing any env vars to override anything. However I still get a Segfault after clicking 'Generate'
It does take a moment to break - but watching my ram usage, both vram and ram usage go up a little on startup, but not any higher after clicking generate. |
I have a 7950x and 7900 xtx. I disabled integrated graphics in my bios and I no longer get the segmentation fault. Running the test-rocm.py was showing that I had two rocm devices. I read on another forum that this might cause problems. Seems it was true for me at least. |
I'm using: my Agent 2 Name: gfx1010 I had the Segmentation fault (core dumped) while using miniconda3. After switching to anaconda this error never appeared again. Now when I run [Fooocus Model Management] Moving model(s) has taken 1.49 seconds |
|
My 5700XT can run Fooocus without issue. Although it's slow (2 minutes an image for extreme mode, 3 minutes an image for Speed mode). I also made a video at https://youtu.be/HgGZyNRA1Ns |
@CobeyH is this issue still present for you using the latest version of Fooocus or can it be closed? |
Still present To create a public link, set |
Runing here without no problem |
How would i use HSA_OVERRIDE_GFX_VERSION=10.3.0 |
HSA_OVERRIDE_GFX_VERSION=xxxx must be placed before the command every time - on a single command (or you can make it permanent in your environment variables - google can tell you how :-) ). Pay attention that the number depends on your card model. Most common are 10.3.0 or 11.0.0 > lookup your card on the internet to be sure (or just try the 2 most common settings and you have 99% chance that one will work). nb : for me I tried the correct value and it still fails. Apparently ROCm does not provide support for some older or integrated AMD GPU's like mine (see the list of supported models on ROCm page). But CPU works very well and my other PC with Nvidia GPU also very well. I love Fooocus :-) |
I am getting the same running in Ubuntu with RX5700 and a 40GB swap, it gets stuck on Preparing Fooocus text 1 before coming back with Segfault It works fine on Windows but I wanted to see if it would run faster on Linux. |
I'm on Fedora, GPU is Radeon RX 6600, CPU is Intel(R) Core(TM) i5-4690, RAM is 16GB. After I click "Generate", it takes a long time and then segfaults. I increased my swap size to 40GB (with a 32GB file added to a 8GB partition), restarted, and nothing changed. My console output is pretty much identical, but I'll copy-paste it anyway:
Hope this gets solved soon! |
Describe the problem
I am running Ubuntu with an AMD GPU. I configured my environment variables and set up rocminfo as suggested by this issue: #1079 .
The web page now launches successfully and it no longer shows an error that the GPU isn't detected. However, when I enter a text or image prompt and click the "Generate" button, a segmentation fault occurs.
** System Info ***
System: Ubuntu 22.04.3
CPU: AMD Ryzen 5 3600
GPU: AMD RX 6750XT
Python: 3.10.13
Environment: Venv
HCC_AMDGPU_TARGET=gfx1031
HSA_OVERRIDE_GFX_VERSION=10.3.2
Full Console Log
Update failed.
authentication required but no callback set
Update succeeded.
[System ARGV] ['entry_with_update.py']
Python 3.10.13 (main, Aug 25 2023, 13:20:03) [GCC 9.4.0]
Fooocus version: 2.1.824
Running on local URL: http://127.0.0.1:7865
To create a public link, set
share=True
inlaunch()
.Total VRAM 12272 MB, total RAM 15903 MB
Set vram state to: NORMAL_VRAM
Disabling smart memory management
Device: cuda:0 AMD Radeon RX 6750 XT : native
VAE dtype: torch.float32
Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --use-split-cross-attention
Refiner unloaded.
model_type EPS
adm 2816
Using split attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using split attention in VAE
extra keys {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'}
Base model loaded: /home/cobey/repos/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors
Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.1], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [/home/cobey/repos/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors].
Loaded LoRA [/home/cobey/repos/Fooocus/models/loras/sd_xl_offset_example-lora_1.0.safetensors] for UNet [/home/cobey/repos/Fooocus/models/checkpoints/juggernautXL_version6Rundiffusion.safetensors] with 788 keys at weight 0.1.
Fooocus V2 Expansion: Vocab with 642 words.
Fooocus Expansion engine loaded for cuda:0, use_fp16 = True.
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
[Fooocus Model Management] Moving model(s) has taken 1.79 seconds
App started successful. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865
[Parameters] Adaptive CFG = 7
[Parameters] Sharpness = 2
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 4.0
[Parameters] Seed = 4950368496917309143
[Parameters] Sampler = dpmpp_2m_sde_gpu - karras
[Parameters] Steps = 30 - 15
[Fooocus] Initializing ...
[Fooocus] Loading models ...
Refiner unloaded.
[Fooocus] Processing prompts ...
[Fooocus] Preparing Fooocus text #1 ...
[1] 10757 segmentation fault (core dumped) python entry_with_update.py
The text was updated successfully, but these errors were encountered: