[GH-ISSUE #112] AttributeError: 'NoneType' object has no attribute '__array_interface__' #83

Open
opened 2026-10-26 21:11:47 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @IvanWaldon on GitHub (Jan 31, 2025).
Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/112

_Traceback (most recent call last):
File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/gradio/routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/gradio/blocks.py", line 1435, in process_api
result = await self.call_function(
File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/gradio/blocks.py", line 1107, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
return await future
File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
result = context.run(func, *args)
File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/gradio/utils.py", line 707, in wrapper
response = f(*args, **kwargs)
File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/torch/utils/contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/oem/Downloads/Janus-main/demo/app_januspro.py", line 58, in multimodal_understanding
pil_images = [Image.fromarray(image)]
File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/PIL/Image.py", line 2982, in fromarray
arr = obj.array_interface
AttributeError: 'NoneType' object has no attribute 'array_interface'

torch 2.5.1+ROCm6.2
GPU: AMD Radeon RX6600

I wonder it's wrong with torch or gradio and how can I deal with it?

Originally created by @IvanWaldon on GitHub (Jan 31, 2025). Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/112 _Traceback (most recent call last): File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/gradio/routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/gradio/blocks.py", line 1435, in process_api result = await self.call_function( File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/gradio/blocks.py", line 1107, in call_function prediction = await anyio.to_thread.run_sync( File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread return await future File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 1005, in run result = context.run(func, *args) File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/gradio/utils.py", line 707, in wrapper response = f(*args, **kwargs) File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "/home/oem/Downloads/Janus-main/demo/app_januspro.py", line 58, in multimodal_understanding pil_images = [Image.fromarray(image)] File "/home/oem/anaconda3/envs/sovits/lib/python3.9/site-packages/PIL/Image.py", line 2982, in fromarray arr = obj.__array_interface__ AttributeError: 'NoneType' object has no attribute '__array_interface__'_ torch 2.5.1+ROCm6.2 GPU: AMD Radeon RX6600 **I wonder it's wrong with torch or gradio and how can I deal with it?**
Author
Owner

@IvanWaldon commented on GitHub (Jan 31, 2025):

For my vram is not large enough to load the model, I tried to load it with arg "dtype=torch.float16", but when I loaded it on CPU, I met the same problem too.

<!-- gh-comment-id:2626455340 --> @IvanWaldon commented on GitHub (Jan 31, 2025): For my vram is not large enough to load the model, I tried to load it with arg "dtype=torch.float16", but when I loaded it on CPU, I met the same problem too.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/Janus#83
No description provided.