Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute '__array_interface__' #112

Open
IvanWaldon opened this issue Jan 31, 2025 · 1 comment

Comments

@IvanWaldon
Copy link

_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?

@IvanWaldon
Copy link
Author

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant