GLV-4V-9B使用mindie230服务化接口测试,无法解析本地图片,报错Download fail: ValueError: Your input local file path is not allowed!
收藏回复举报
GLV-4V-9B使用mindie230服务化接口测试,无法解析本地图片,报错Download fail: ValueError: Your input local file path is not allowed!
t('forum.solved') 已解决
发表于2026-03-04 18:13:10
0 查看

# 模型运行环境

docker run -itd  --name=glm-4v-9b  --privileged --net=host \

   --shm-size 50g \

   --device=/dev/davinci4 \

   --device=/dev/davinci5 \

   --device=/dev/davinci6 \

   --device=/dev/davinci7 \

   --device=/dev/davinci_manager \

   --device=/dev/hisi_hdc \

   --device /dev/devmm_svm \

   -v /usr/local/Ascend/driver:/usr/local/Ascend/driver \

   -v /usr/local/Ascend/firmware:/usr/local/Ascend/firmware \

   -v /usr/local/sbin/npu-smi:/usr/local/sbin/npu-smi \

   -v /usr/local/sbin:/usr/local/sbin \

   -v /etc/hccn.conf:/etc/hccn.conf \

   -v /data/models:/data/models  \

   swr.cn-south-1.myhuaweicloud.com/ascendhub/mindie:2.3.0-800I-A2-py311-openeuler24.03-lts \

   bash

# 容器环境初始化

source /usr/local/Ascend/ascend-toolkit/set_env.sh

source /usr/local/Ascend/nnal/atb/set_env.sh

source /usr/local/Ascend/atb-models/set_env.sh

source /usr/local/Ascend/mindie/set_env.sh

# 指定device

export ASCEND_RT_VISIBLE_DEVICES=7

# 启动模型服务

nohup ./bin/mindieservice_daemon > output.log 2>&1 &

[ConfigManager::ExecuteConfigInteractions] Configuration interactions completed successfully

[ConfigManager::InitConfigManager] Successfully init config manager

LogLevelDynamicHandler start

LogLevelDynamicHandler start

Daemon start success!

2、在哪个步骤出现了问题?

答复:使用curl请求模型服务,测试本地图片出现{"error":"[InferTokenizer::DownloadUrl] Download fail: ValueError: Your input local file path is not allowed!please ensure your multimedia files are placed under ***/multimodal_inputs/","error_type":"Input Validation Error"}

附:测试本地图片 vs 远端图片

# 测试本地图片识别

ll /data/models/test_glm_4v_7b/

total 16

-rwxr-x---. 1 root root 5462 Mar  2 16:53 test.jpeg

-rwxr-x---. 1 root root 5462 Feb 28 18:42 test.png

# curl请求

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{

    "model": "glm-4v-9b",

    "messages": [

        {"role": "user",

         "content": [{"type": "image_url", "image_url": "/data/models/test_glm_4v_7b/test.png"},

             {"type": "text", "text": "分析图片内容:"}]}

    ],

    "do_sample": true,

    "temperature": 0.6,

    "top_p": 0.95,

    "top_k": 20,

    "max_tokens": 2000,

    "stream": false

}' "http://194.x.x.4:11025/v1/chat/completions"

{"error":"[InferTokenizer::DownloadUrl] Download fail: ValueError: Your input local file path is not allowed!please ensure your multimedia files are placed under ***/multimodal_inputs/","error_type":"Input Validation Error"}

# 测试远端图片识别

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{son" -H "Content-type: application/json" -X POST -d '{

    "model": "glm-4v-9b",

    "messages": [

        {"role": "user",

         "content": [{"type": "image_url", "image_url": "https://hellorfimg.zcool.cn/provider_image/large/hi2246794331.jpg?x-image-process=image/format,webp"},

             {"type": "text", "text": "分析图片内容:"}]}

    ],

    "do_sample": true,

    "temperature": 0.6,

    "top_p": 0.95,

    "top_k": 20,

    "max_tokens": 2000,

    "stream": false

}' "http://1xx.x.xx.x:11025/v1/chat/completions"

{"id":"endpoint_common_1","object":"chat.completion","created":1772618865,"model":"glm-4v-9b","choices":[{"index":0,"message":{"role":"assistant","content":"这是一张展示中国古典建筑的照片,主体是一座五层的红褐色阁楼式建筑,建筑风格为典型的中式阁楼,屋顶为重檐歇山顶式样,屋脊上有精美的雕塑装饰,檐角翘起,给人一种飞檐斗拱的感觉。建筑下方有一个牌匾,但具体文字不清晰。建筑周围环境绿树成荫,天气晴朗,可以看到蓝天白云。在建筑前方有一些鲜花和绿植,还有一个人坐在长凳上休息。  \n\n这座建筑就是泉州开元寺,位于福建省泉州市鲤城区承天寺街23号,始建于唐垂拱二年(686年),初名莲花寺,晚唐乾宁三年改名为开元寺。是福建省内规模最大的佛教寺院,全国重点文物保护单位之一。开元寺内有大雄宝殿、千佛塔、东西塔、开元寺东西塔、甘露戒坛、东西塔、东西塔、东西塔等名胜古迹。开元寺东西塔为全国重点文物保护单位。","tool_calls":[]},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":1611,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens":206,"total_tokens":1817,"batch_size":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],"queue_wait_time":[6197,742,1110,403,705,1023,832,1083,1053,181,150,170,101,188,147,138,210,185,271,186,254,260,238,220,189,191,211,161,108,169,207,193,99,164,131,162,148,228,156,173,165,198,154,228,118,129,670,492,132,222,154,142,162,1049,103,1107,201,205,231,176,940,775,157,676,165,1085,214,209,229,254,239,154,174,205,194,157,173,116,212,231,163,133,186,244,194,201,206,171,194,179,160,257,74,182,162,119,1011,271,312,300,306,261,294,240,317,220,178,261,218,197,1097,196,114,215,311,233,235,184,218,78,104,96,119,161,103,152,62,110,84,66,114,929,175,91,995,130,188,58,171,94,119,804,1012,161,187,218,165,197,193,246,156,188,160,161,227,221,98,1036,110,124,1083,142,88,1078,1034,58,1053,51,130,1099,143,1037,88,290,98,73,49,1089,58,132,153,1088,966,1050,79,168,51,1071,149,92,146,167,50,1079,147,129,96,142,169,1040,997,96,87,1092,1091,160]},"prefill_time":1253,"decode_time_arr":[138,22,21,21,22,21,22,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,21,21,21,21,21,21,22,21,22,21,21,21,21,22,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,23,22,21,21,21,21,21,21,22,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,21,21,22,21,21,22,22,21,22,21,21,22,21,22,21,21,21,21,21,22,21,21,21,22,22,22,21,21,21,22,21,21,21,21,21,22,21,21,21,21,21,22,22,21,21,22,22,21]}

本帖最后由 匿名用户2026/03/05 16:56:30 编辑

我要发帖子