Intel Arc Graphics Thread #476
Replies: 85 comments 249 replies
-
UPDATE:
Before Intel update it, the code needs to be modified like this to avoid reporting errors: - match operation:
- case "multiply":
- output[top:bottom, left:right] = destination_portion * source_portion
- case "add":
- output[top:bottom, left:right] = destination_portion + source_portion
- case "subtract":
- output[top:bottom, left:right] = destination_portion - source_portion
+ if operation == "multiply":
+ output[top:bottom, left:right] = destination_portion * source_portion
+ elif operation == "add":
+ output[top:bottom, left:right] = destination_portion + source_portion
+ elif operation == "subtract":
+ output[top:bottom, left:right] = destination_portion - source_portion Of course not modifying it doesn't seem to affect normal usage. |
Beta Was this translation helpful? Give feedback.
-
About Karras scheduler: Currently using it causes a -996 "uses-fp64-math" error, which may be fixed in the next IPEX release (intel/intel-extension-for-pytorch#285) Until then, can specify to use # comfy/samplers.py
- sigmas = k_diffusion_sampling.get_sigmas_karras(n=steps, sigma_min=self.sigma_min, sigma_max=self.sigma_max, device=self.device)
+ sigmas = k_diffusion_sampling.get_sigmas_karras(n=steps, sigma_min=self.sigma_min, sigma_max=self.sigma_max, device="cpu") |
Beta Was this translation helpful? Give feedback.
-
is it Linux only or can you use this on a win10 machine? |
Beta Was this translation helpful? Give feedback.
-
So again, sharing the good news. An XPU version of their Pytorch extension with Pytorch 2.0 support, Hats off to ComfyUI for being the only Stable Diffusion UI to be able to do it at the moment but there are a bunch of caveats with running Arc and Stable Diffusion right now from the research I have done. As of the time of posting: 1.) Setup can still be complicated in some respects and can randomly not work because Intel is only really verifying for enterprise Linux distributions and Ubuntu. My base Linux Fedora 38 install has the RPMs installed but I get a cryptic error regarding the runtime saying 2.) From what I have read at intel/intel-extension-for-pytorch#398, there is no native Windows version for some wheels to get 3.) Intel Arc right now has a huge problem with allocating more than 4GB of VRAM in IPEX even though the card has more VRAM in the case of the A750/A770 according to intel/intel-extension-for-pytorch#325. This seems to have mitigations elsewhere in Intel's oneAPI stack like their OpenCL compute runtime where anything you compile, you can work your code to go around the restriction via some flags and changed code according to intel/compute-runtime#627. No workarounds, it seems, until someone gets Intel to fix it. 4.) Because of that, experimenting with other Stable Diffusion UIs, it seems like every once in a while, Arc will occasionally run out of VRAM if you decide to not use lower VRAM flags and throw a 5.) Intel has an equivalent to
I'm not even sure if I'm sure that Intel GPU support will not a big priority at the moment for the project, given the big blocker at this point is the 4GB VRAM limit which needs to be fixed by Intel. But that being said, things should be working a lot better than it is at the moment, maybe not average user ready, but should be ready for any mildly technical person. I really want to play with ComfyUI more but I really don't want to restart the application server for every several image I might want to generate even or rolling a dice for SDXL to actually finish a workflow. But the Arc cards are strong. I managed to equal the Nvidia RTX 3070 Ti in certain Stable Diffusion workflows with my 16 GB Intel Arc A770 so I look forward to the future when things are more mature and all the stars are aligned. Also not sure what issues need to be open here but there is potentially 2-3 of them that could be made from my report. Edit: Added a caveat I forgot to mention and filled in some information and fixed some typos. |
Beta Was this translation helpful? Give feedback.
-
So this took me a bit of time, but I have the Docker image I used published here so hopefully someone can find it useful. Some things to note I've found while poking and experimenting with things. 1.) A lot of the issues are gone mentioned before by @kwaa months ago like the Karras scheduler not working, where it is working now even with the new dpmpp_3 schedulers, or noise issues if not using split attention which is gone for the most part unless your graphics driver has crashed too many times and a restart of the computer fixes that. Anyways, hope people have good success with it like I did. I might try and see why ipexrun is failing but for now, I am going to take a break. Edit: Added in a caveat I forgot to mention and fixed some typos. |
Beta Was this translation helpful? Give feedback.
-
In the event anyone else missed it: I seem to be missing the file that gets sourced from /opt/intel, too... may edit this post once I figure it out. |
Beta Was this translation helpful? Give feedback.
-
Well, short story. After spend whole day to install Arch Linux on Windows 10 WSL (2 in my case). After all procedures, I stuck on
The installer reach a 87% and starts roll back all changes, because intel-oneapi-basekit not contain library libtbb.so.12 that needed to install oneAPI AI Analytics Toolkit v2023. The packgage that contains needed library is intel-oneapi-compiler-shared-runtime but it conflict with intel-oneapi-basekit. Because the istall procedure can't finish with intel-oneapi-basekit, I install intel-oneapi-compiler-shared-runtime. ComfyUI runs: [{user}@pc ArchLinux]$
But if i try to generate image I get an next error:
As can see, I tries params like --force-fp16 --bf16-vae --lowvram --use-split-cross-attention --highvram but it's have no effect. So, models are loaded, but KSampler are crashes. And that's my dead end, because I have no idea what's going on. Not in ComfyUI itself, and also there more in Linux Arch. But I suppose this can be a kind of report. |
Beta Was this translation helpful? Give feedback.
-
I don't use Windows, but all the pieces should be together to run ComfyUI on Windows now without any horrible downsides like no AOT compilation or missing packages since a new unofficial Intel Extension for Python package has been released without needing any installation of external dependencies and bundling it all together. It remains to be seen whether there will ever be an official package that does this so this package is the best chance anyone has at actually using Arc on Windows natively. According to reports, it is a bit faster than WSL2 but slower than Linux native. The rough steps to do this should be roughly the same as the process outlined in the opening post for Linux minus platform-specific things. 1.) Make sure you install an Intel driver that is 4952 or newer. The latest driver can be found here python -m ensurepip --upgrade 3.) Install git from here using the GUI installer or other means. cd <location where to place ComfyUI>
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI 5.) Download non-official Intel Extension for Pytorch packages here and install the packages with pip. Assuming they are all put in the root of the ComfyUI repository, run this command line. pip install intel_extension_for_pytorch-2.0.110+git0f2597b-cp310-cp310-win_amd64.whl torch-2.0.0a0+gite9ebda2-cp310-cp310-win_amd64.whl torchvision-0.15.2a0+fa99a53-cp310-cp310-win_amd64.whl Again, I will need to remind you this is unofficial and does have a degree of risk but it should be mostly safe. 6.) Finish the rest of the installation pip install -r requirements.txt At this point, you should be done with the installation. To run ComfyUI each time from scratch, open a terminal/command prompt. Then run the following command lines replacing <> with your own input: cd <location of ComfyUI>
python main.py <Any extra ComfyUI arguments you want to use> |
Beta Was this translation helpful? Give feedback.
-
Reinstall in forced mode, needed dll in place, but still get this error. Can it be relevant to folder rights or upper or lower letter case in "user"? |
Beta Was this translation helpful? Give feedback.
-
There really needs to be a better, more updated tutorial for this. Much of the information is stretched out over the thread and mixed up with information between Linux and Windows |
Beta Was this translation helpful? Give feedback.
-
To install on Ubuntu. 1.) Install Linux drivers with the following instructions provided by Intel here sudo apt install python3-pip git 3.) Install ComfyUI with the following terminal commands replacing the <> portion with a selection of your choice. cd <Location to put ComfyUI>
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI 4.) Install all the Intel Extension for Pytorch pip Python packages first with this terminal command. python -m pip install torch==2.0.1a0 torchvision==0.15.2a0 intel-extension-for-pytorch==2.0.110+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ 5.) Finish the rest of the dependency installation with this terminal command: pip install -r requirements.txt Installation should be done at this point. To run ComfyUI, one can type in the following terminal commands replacing <> with your own input: cd <location of ComfyUI>
python main.py <Any extra ComfyUI arguments you want to use> For other Linux distros outside of Arch Linux or Ubuntu, one will need to manually install the Intel compute runtime, git, a Python with a version supported by Intel Extension for Pytorch like 3.10 as of the time of this writing or using Intel's Python from the AI Kit which will provide that, pip, and any other dependencies required according to your own Linux distribution's package manager or install scripts but one should be able to then just follow step 3 and onwards without any issue afterwards. |
Beta Was this translation helpful? Give feedback.
-
I've updated the Arch Linux setup guide for the latest IPEX and ComfyUI, without oneAPI AI Kit. If anyone wants to uninstall the previously installed AI Kit, it's available: cd /opt/intel/oneapi/installer
sudo ./installer --action remove --product-id intel.oneapi.lin.aikit.product --product-ver 2023.1.0-31760
# if you don't need
paru -Rsc libxcrypt-compat |
Beta Was this translation helpful? Give feedback.
-
New Patch!Thanks to vladmandic/automatic for the code. contributors Basically, you just need to copy Then modify try:
import intel_extension_for_pytorch as ipex
if torch.xpu.is_available():
xpu_available = True
+ from attention import attention_init
+ ok, e = attention_init()
except:
pass It could partially fix intel/intel-extension-for-pytorch#325. (so f**k you, intel) |
Beta Was this translation helpful? Give feedback.
-
Cool... Got it working with WSL2 using Arch. Followed the instructions at the top, as well as installed jemalloc paru(root/native environment), openmp via pip(venv). There are issues with the env vars as Arch is pulling my windows env vars through. So I some times have to re run the setvars.sh. I get warnings about libpng when I run via python or ipexrun. Everything still works though. I generally run through ipexrun but add xpu to the command i.e.
Apart from some memory overruns I've had no issues the last few days. |
Beta Was this translation helpful? Give feedback.
-
anybody can tell where intel store their patches for pytorch? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
File "C:\ComfyUI2\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda_init_.py", line 971, in current_device C:\ComfyUI2\ComfyUI_windows_portable>pause |
Beta Was this translation helpful? Give feedback.
-
Does anybody have a list of stable diffusion models compatible with a B580? |
Beta Was this translation helpful? Give feedback.
-
very new to this and I probably don't understand everything going on .. but, are the ipex builds only going to work on with Intel cpus and Intel Arc cards? i have a amd cpu (5600G) with Intel arc b580 ... no matter what docker version of comfyui I've tried, including just the intel base image to test pytorch, I get some type of error like this. ollama docker works fine passing thru the same device (/dev/dri). i can also run comfyui with pytorch on the ubuntu vm host fine. unfortunately, I don't have a intel cpu to test with the card ... comfyui-ipex | [notice] A new release of pip is available: 25.0.1 -> 25.1.1 |
Beta Was this translation helpful? Give feedback.
-
I wanted to know why ipex? Since just torch works a thousand times better than with ipex installed. |
Beta Was this translation helpful? Give feedback.
-
Running WAN2.1 I2V 480P with CausVid lora on A770/B580With CausVid lora, you can generate video with only 6~9 steps. Requirements
Note that, You should use fp16 or bf16 model without casting dtype, because using fp8 model or casting to fp8 cause black image. Prerequisites
How to
Generation speedSetttings: 512x768, 93 length(frame), 9steps
ResultComfyUI_00258_.webm |
Beta Was this translation helpful? Give feedback.
-
Quick warning for others to not make my mistake: When you have https://github.com/neuratech-ai/ComfyUI-MultiGPU installed everything runs on CPU. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@bedovyy what was your workflow for Flux1 Dev? I have been experimenting and am having no success yet. |
Beta Was this translation helpful? Give feedback.
-
Does anyone know if it's possible to run Chroma on an Intel GPU? I can't get it to work properly on my A770/16GB, I'm getting "The model is mixed with different device type" error. |
Beta Was this translation helpful? Give feedback.
-
Is UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY error on B580 GPU OK ?
I tried different settings, but crashes still happening sometimes. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Best way to use comfyui on arc for me was. Use pytorch 2.8, and don't
install ipex, on my a580 it generates 1024x1024 images in seconds, It does
not give a vram error, or similar.
Em qui., 10 de jul. de 2025, 09:26, PatsySE ***@***.***>
escreveu:
… Yeah, im running chroma on my intel b580 steel legend.
Look at this image
image.png (view on web)
<https://github.com/user-attachments/assets/90185a62-5ecb-40b2-b7ce-8d8c592e9669>
start command python main.py --disable-xformers --disable-smart-memory
--lowvram --disable-ipex-optimize
python 3.10.6 pytorch version: 2.5.1+cxx11.abi
—
Reply to this email directly, view it on GitHub
<#476 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKG7HGJUSXIIGWU3LS5EBL33HZLX7AVCNFSM6AAAAAAWZ5LOZKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNZSGAZTCNI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Try Wan2.1 I2V 240x480 length 41 (CFG:1, Step:6)
|
Beta Was this translation helpful? Give feedback.
-
I recently made some improvements to the XPU backend into ComfyUI and mainly added in code so the experimental |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ComfyUI now supports Intel Arc Graphics. (#409)
Since the installation tutorial for Intel Arc Graphics is quite long, I'll write it here first.
Intel Extension for PyTorch is currently only available for Linux, so you will need to have a Linux or WSL environment.
Arch Linux (with
paru
) are used here as example operating systems.Install Python and PIP:
Install Intel Compute Runtime and Intel oneAPI Base Kit:
Install ComfyUI:
Install Dependencies (via
venv
):python -m venv venv source venv/bin/activate pip install torch==2.0.1a0 torchvision==0.15.2a0 intel-extension-for-pytorch==2.0.120+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl-aitools/ pip install -r requirements.txt
For the second start and beyond, venv needs to be reactivated:
source venv/bin/activate
Set oneAPI vars:
source /opt/intel/oneapi/setvars.sh
Running ComfyUI (via
python
):Running ComfyUI (via
ipexrun
):Beta Was this translation helpful? Give feedback.
All reactions