comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
47.73k stars 5.03k forks source link

Ipexrun issues #3960

Closed Whackjob closed 1 week ago

Whackjob commented 1 month ago

Your question

I've been trying to fix this for a while without success. ComfyUI will run just fine. I go to run an image, or a batch of images, and it'll get all the way to the VAE decode before it just kind of hangs. I'm seeing new errors on startup and during operation. I've updated everything. I've reinstall pytorch and all the intel kits. I don't think I've missed anything. Could use some advice!

venv~) whackjob@WhackjobONE:/media/whackjob/16Tons/AI/ComfyUI$ ipexrun main.py --use-pytorch-cross-attention --highvram /home/whackjob/.local/lib/python3.10/site-packages/intel_extension_for_pytorch/launcher.py:102: UserWarning: Backend is not specified, it will automatically default to cpu. warnings.warn( 2024-07-06 12:47:17,832 - intel_extension_for_pytorch.cpu.launch.launch - WARNING - Neither of ['tcmalloc', 'jemalloc'] memory allocator is found in ['/media/whackjob/16Tons/AI/ComfyUI/venv~/lib/', '/home/whackjob/.local/lib/', '/usr/local/lib/', '/usr/local/lib64/', '/usr/lib/', '/usr/lib64/', '/usr/lib/x86_64-linux-gnu/']. 2024-07-06 12:47:17,832 - intel_extension_for_pytorch.cpu.launch.launch - INFO - Use 'default' memory allocator. This may drop the performance. 2024-07-06 12:47:17,832 - intel_extension_for_pytorch.cpu.launch.launch - WARNING - 'intel' OpenMP runtime is not found in ['/media/whackjob/16Tons/AI/ComfyUI/venv~/lib/', '/home/whackjob/.local/lib/', '/usr/local/lib/', '/usr/local/lib64/', '/usr/lib/', '/usr/lib64/', '/usr/lib/x86_64-linux-gnu/']. 2024-07-06 12:47:17,832 - intel_extension_for_pytorch.cpu.launch.launch - INFO - Use 'default' OpenMP runtime. 2024-07-06 12:47:17,836 - intel_extension_for_pytorch.cpu.launch.launch - INFO - Use 'auto' => 'taskset' multi-task manager. 2024-07-06 12:47:17,836 - intel_extension_for_pytorch.cpu.launch.launch - INFO - env: Untouched preset environment variables are not displayed. 2024-07-06 12:47:17,836 - intel_extension_for_pytorch.cpu.launch.launch - INFO - env: OMP_SCHEDULE=STATIC 2024-07-06 12:47:17,836 - intel_extension_for_pytorch.cpu.launch.launch - INFO - env: OMP_PROC_BIND=CLOSE 2024-07-06 12:47:17,836 - intel_extension_for_pytorch.cpu.launch.launch - INFO - env: OMP_NUM_THREADS=6 2024-07-06 12:47:17,836 - intel_extension_for_pytorch.cpu.launch.launch - INFO - cmd: taskset -c 0-5 /usr/bin/python3 -u main.py --use-pytorch-cross-attention --highvram [START] Security scan [DONE] Security scan

ComfyUI-Manager: installing dependencies done.

ComfyUI startup time: 2024-07-06 12:47:18.344036 Platform: Linux Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] Python executable: /usr/bin/python3 ComfyUI Path: /media/whackjob/16Tons/AI/ComfyUI Log path: /media/whackjob/16Tons/AI/ComfyUI/comfyui.log

Logs

No response

Other

No response

simonlui commented 1 month ago

I can confirm something wacky is going on with IPEX for some reason with VAE Decode which I am currently trying to debug myself. However, the issue with me is with XPU and not CPU so I am not sure how much is applicable. It seems like it could be a kernel update issue or something, but nothing stands out to me as being the issue so far. It may be unrelated to ComfyUI as I went back to a commit that supposedly should work and ComfyUI now doesn't run.

Whackjob commented 1 month ago

Hrm. I do have an intel arc 770a with 16GB. I don't want to use CPU. But I do see the same problem and it's when it gets to VAE decode. I just can't explain that weird startup output. And it tells me tcmalloc or jemalloc isn't installed. And then backend not being specified. I even deleted my venv folder and rebuilt, no effect. It's a relief if it turns out to be IPEX and not me.

melrhombus commented 1 month ago

Similar behavior here, at least the VAE hanging bit.. I'm using that IPEX docker for Arc and everything loads up but when it hits the VAE decode it hangs while randomly pegging a cpu thread 100% and eventually seg faults.

I tried a SD.Next docker with IPEX and it works albeit slow due to the kernel problem I believe

simonlui commented 1 week ago

I got to investigate it, it seemed it was a faulty package in oneAPI but since Intel released IPEX v2.1.40+xpu and updating solved the issue, I did that to solve the VAE hanging issue in my ComfyUI Docker for Intel.