NexaAI / nexa-sdk

Nexa SDK is a comprehensive toolkit for supporting GGML and ONNX models. It supports text generation, image generation, vision-language models (VLM), Audio Language Model, auto-speech-recognition (ASR), and text-to-speech (TTS) capabilities.
https://docs.nexa.ai/
Apache License 2.0
4.47k stars 659 forks source link

[BUG] error on nexa server command in termux #123

Open Alias4D opened 2 months ago

Alias4D commented 2 months ago

Issue Description

I get error when use nexa server command nexaai server Qwen2.5-Coder-1.5B-Instruct:q4_0

Error TypeError: unsupported operand type(s) for |: 'type' and 'type'

Steps to Reproduce

I install nexaai on my phone using termux Chat is running fine but when run server as below

nexaai server Qwen2.5-Coder-1.5B-Instruct:q4_0

Traceback (most recent call last): File "/usr/local/bin/nexaai", line 8, in sys.exit(main()) File "/usr/local/lib64/python3.9/site-packages/nexa/cli/entry.py", line 190, in main run_ggml_inference(args) File "/usr/local/lib64/python3.9/site-packages/nexa/cli/entry.py", line 9, in run_ggml_inference from nexa.gguf.server.nexa_service import run_nexa_ai_service as NexaServer File "/usr/local/lib64/python3.9/site-packages/nexa/gguf/server/nexa_service.py", line 28, in from nexa.gguf.sd.stable_diffusion import StableDiffusion File "/usr/local/lib64/python3.9/site-packages/nexa/gguf/sd/stable_diffusion.py", line 822, in def validate_dimensions(dimension: int | float, attribute_name: str) -> int: TypeError: unsupported operand type(s) for |: 'type' and 'type'

OS

Android, Termux fedora distro

Python Version

3.9.9

Nexa SDK Version

0.8.5

GPU (if using one)

No response

Alias4D commented 2 months ago

Screenshot_2024-09-28-14-37-45-492_com termux

Alias4D commented 1 month ago

Any solution please 🙏

Davidqian123 commented 1 month ago

Sorry for the late reply. The error might be caused by the compatibility issues with Android kernel. Some packages might behave differently in Linux and Android kernel even these two are very similar. Try to reinstall the latest version of nexaai, run nexa run Llama3.2-3B-Instruct:q4_0 and check if it works. BTW, nexa-sdk mobile version(Android and iOS) is on our roadmao, we are actively developing it~

Alias4D commented 1 month ago

OK, I am waiting ❤️