issue: Attaching file to a prompt produces a CUDA error #5073

Closed
opened 2025-11-11 16:11:27 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @Nexxsys on GitHub (May 6, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.6 - 2025-05-05

Ollama Version (if applicable)

3.2:Latest

Operating System

Linux Mint 12

Browser (if applicable)

Brave

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

File is attached with no error.

Actual Behavior

Attaching a file to a prompt produces this error: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

Steps to Reproduce

At the prompt, click the plus sign Upload Files, and select any file of any type to produce the error

Logs & Screenshots

File "/usr/local/lib/python3.11/site-packages/transformers/models/bert/modeling_bert.py", line 1080, in forward
embedding_output = self.embeddings(
└ BertModel(
(embeddings): BertEmbeddings(
(word_embeddings): Embedding(30522, 384, padding_idx=0)
(position_embeddin...
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
│ │ │ └
│ │ └ ()
│ └ <function Module._call_impl at 0x7d591af7c9a0>
└ BertEmbeddings(
(word_embeddings): Embedding(30522, 384, padding_idx=0)
(position_embeddings): Embedding(512, 384)
(tok...
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)
│ │ └
│ └ ()
└ <bound method BertEmbeddings.forward of BertEmbeddings(
(word_embeddings): Embedding(30522, 384, padding_idx=0)
(position...
File "/usr/local/lib/python3.11/site-packages/transformers/models/bert/modeling_bert.py", line 211, in forward
inputs_embeds = self.word_embeddings(input_ids)
│ └
└ BertEmbeddings(
(word_embeddings): Embedding(30522, 384, padding_idx=0)
(position_embeddings): Embedding(512, 384)
(tok...
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
│ │ │ └ {}
│ │ └
│ └ <function Module._call_impl at 0x7d591af7c9a0>
└ Embedding(30522, 384, padding_idx=0)
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)
│ │ └ {}
│ └
└ <bound method Embedding.forward of Embedding(30522, 384, padding_idx=0)>
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/sparse.py", line 190, in forward
return F.embedding(
│ └ <function embedding at 0x7d5915bb6700>
└ <module 'torch.nn.functional' from '/usr/local/lib/python3.11/site-packages/torch/nn/functional.py'>
File "/usr/local/lib/python3.11/site-packages/torch/nn/functional.py", line 2551, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
│ │ │ │ │ │ └ False
│ │ │ │ │ └ False
│ │ │ │ └ 0
│ │ │ └
│ │ └
│ └ <built-in method embedding of type object at 0x7d5a208d8f80>
└ <module 'torch' from '/usr/local/lib/python3.11/site-packages/torch/init.py'>
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x7d5a31bac860>
└ <WorkerThread(AnyIO worker thread, started 137818412148416)>
File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function WorkerThread.run at 0x7d58851c6200>
└ <WorkerThread(AnyIO worker thread, started 137818412148416)>
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
result = context.run(func, *args)
│ │ │ └ ()
│ │ └ functools.partial(<function upload_file at 0x7d58f0bc8400>, user=UserModel(id='60b2ead4-73fa-43bc-a0ff-8538523c50f7', name='T...
│ └ <method 'run' of '_contextvars.Context' objects>
└ <_contextvars.Context object at 0x7d5885172a80>

File "/app/backend/open_webui/routers/files.py", line 155, in upload_file
process_file(request, ProcessFileForm(file_id=id), user=user)
│ │ │ │ └ UserModel(id='60b2ead4-73fa-43bc-a0ff-8538523c50f7', name='"', email='"', role='admin', profile_imag...
│ │ │ └ '3dc97043-7027-4834-8ab3-882df54778c0'
│ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
│ └ <starlette.requests.Request object at 0x7d5884db2e90>
└ <function process_file at 0x7d58dd84ccc0>
File "/app/backend/open_webui/routers/retrieval.py", line 1194, in process_file
raise HTTPException(
└ <class 'fastapi.exceptions.HTTPException'>
fastapi.exceptions.HTTPException: 400: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.
2025-05-06 19:57:33.737 | ERROR | open_webui.routers.files:upload_file:160 - Error processing file: 3dc97043-7027-4834-8ab3-882df54778c0 - {}
2025-05-06 19:57:33.738 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.0.0.159:14711 - "POST /api/v1/files/ HTTP/1.1" 200 - {}

Additional Information

NVIDIA-SMI 550.144.03 Driver Version: 550.144.03 CUDA Version: 12.4

Originally created by @Nexxsys on GitHub (May 6, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.6 - 2025-05-05 ### Ollama Version (if applicable) 3.2:Latest ### Operating System Linux Mint 12 ### Browser (if applicable) Brave ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior File is attached with no error. ### Actual Behavior Attaching a file to a prompt produces this error: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions. ### Steps to Reproduce At the prompt, click the plus sign Upload Files, and select any file of any type to produce the error ### Logs & Screenshots File "/usr/local/lib/python3.11/site-packages/transformers/models/bert/modeling_bert.py", line 1080, in forward embedding_output = self.embeddings( └ BertModel( (embeddings): BertEmbeddings( (word_embeddings): Embedding(30522, 384, padding_idx=0) (position_embeddin... File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) │ │ │ └ <unprintable dict object> │ │ └ () │ └ <function Module._call_impl at 0x7d591af7c9a0> └ BertEmbeddings( (word_embeddings): Embedding(30522, 384, padding_idx=0) (position_embeddings): Embedding(512, 384) (tok... File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) │ │ └ <unprintable dict object> │ └ () └ <bound method BertEmbeddings.forward of BertEmbeddings( (word_embeddings): Embedding(30522, 384, padding_idx=0) (position... File "/usr/local/lib/python3.11/site-packages/transformers/models/bert/modeling_bert.py", line 211, in forward inputs_embeds = self.word_embeddings(input_ids) │ └ <unprintable Tensor object> └ BertEmbeddings( (word_embeddings): Embedding(30522, 384, padding_idx=0) (position_embeddings): Embedding(512, 384) (tok... File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) │ │ │ └ {} │ │ └ <unprintable tuple object> │ └ <function Module._call_impl at 0x7d591af7c9a0> └ Embedding(30522, 384, padding_idx=0) File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) │ │ └ {} │ └ <unprintable tuple object> └ <bound method Embedding.forward of Embedding(30522, 384, padding_idx=0)> File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/sparse.py", line 190, in forward return F.embedding( │ └ <function embedding at 0x7d5915bb6700> └ <module 'torch.nn.functional' from '/usr/local/lib/python3.11/site-packages/torch/nn/functional.py'> File "/usr/local/lib/python3.11/site-packages/torch/nn/functional.py", line 2551, in embedding return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse) │ │ │ │ │ │ └ False │ │ │ │ │ └ False │ │ │ │ └ 0 │ │ │ └ <unprintable Tensor object> │ │ └ <unprintable Parameter object> │ └ <built-in method embedding of type object at 0x7d5a208d8f80> └ <module 'torch' from '/usr/local/lib/python3.11/site-packages/torch/__init__.py'> RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7d5a31bac860> └ <WorkerThread(AnyIO worker thread, started 137818412148416)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x7d58851c6200> └ <WorkerThread(AnyIO worker thread, started 137818412148416)> File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function upload_file at 0x7d58f0bc8400>, user=UserModel(id='60b2ead4-73fa-43bc-a0ff-8538523c50f7', name='T... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x7d5885172a80> > File "/app/backend/open_webui/routers/files.py", line 155, in upload_file process_file(request, ProcessFileForm(file_id=id), user=user) │ │ │ │ └ UserModel(id='60b2ead4-73fa-43bc-a0ff-8538523c50f7', name='"', email='"', role='admin', profile_imag... │ │ │ └ '3dc97043-7027-4834-8ab3-882df54778c0' │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x7d5884db2e90> └ <function process_file at 0x7d58dd84ccc0> File "/app/backend/open_webui/routers/retrieval.py", line 1194, in process_file raise HTTPException( └ <class 'fastapi.exceptions.HTTPException'> fastapi.exceptions.HTTPException: 400: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions. 2025-05-06 19:57:33.737 | ERROR | open_webui.routers.files:upload_file:160 - Error processing file: 3dc97043-7027-4834-8ab3-882df54778c0 - {} 2025-05-06 19:57:33.738 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.0.0.159:14711 - "POST /api/v1/files/ HTTP/1.1" 200 - {} ### Additional Information NVIDIA-SMI 550.144.03 Driver Version: 550.144.03 CUDA Version: 12.4
GiteaMirror added the bug label 2025-11-11 16:11:27 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5073