When running ComfyUI on Ubuntu, especially when working with GGUF files, you might run into an error with the k-sampler if you’re using an Intel Arc GPU.

But I managed to get around the error by tweaking the GGUF custom node!
Alright, let me show you how I made it work.
Tweak the “pig.py” file in the “GGUF” custom node

Open the pig.py
file in the custom node with your text editor.
for sd_key, tensor in tensors:
By searching for “for sd_key, tensor in tensors:”, you can spot the relevant code around that section.
for sd_key, tensor in tensors:
tensor_name = tensor.name
torch_tensor = torch.from_numpy(tensor.data)
shape = get_orig_shape(reader, tensor_name)
Replace the script above with the one below.
for sd_key, tensor in tensors:
tensor_name = tensor.name
#torch_tensor = torch.from_numpy(tensor.data)
import numpy as np
np_arr = np.require(tensor.data, requirements=['C'])
if not np_arr.flags.writeable:
np_arr = np.array(np_arr, copy=True)
torch_tensor = torch.from_numpy(np_arr.copy())
shape = get_orig_shape(reader, tensor_name)
That completes the modifications.
If you don’t know how to edit the file…
Just download the pig.zip file above and replace it. Don’t forget to unzip it first!
Hope everything goes smoothly for you. That’s all for this write-up—until next time, my fellow ARC friends!
コメント