File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call
raise e
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/fastapi/routing.py", line 274, in app
raw_response = await run_endpoint_function(
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(*values)
File "/home/m2_pan/VisualGLM-6B/api.py", line 39, in visualglm
answer, history, = chat(None, model, tokenizer, input_text, history=history, image=input_image, \
File "/home/m2_pan/VisualGLM-6B/model/chat.py", line 125, in chat
input1 = [tokenizer.pad_token_id] model.image_length
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1695, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'ChatGLMForConditionalGeneration' object has no attribute 'image_length'
File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call await self.app(scope, receive, _send) File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call raise exc File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call await self.app(scope, receive, sender) File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call raise e File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call await self.app(scope, receive, send) File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/routing.py", line 718, in call await route.handle(scope, receive, send) File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/starlette/routing.py", line 66, in app response = await func(request) File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/fastapi/routing.py", line 274, in app raw_response = await run_endpoint_function( File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function return await dependant.call(*values) File "/home/m2_pan/VisualGLM-6B/api.py", line 39, in visualglm answer, history, = chat(None, model, tokenizer, input_text, history=history, image=input_image, \ File "/home/m2_pan/VisualGLM-6B/model/chat.py", line 125, in chat input1 = [tokenizer.pad_token_id] model.image_length File "/home/conda987root/envs/yuyin3/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1695, in getattr raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'") AttributeError: 'ChatGLMForConditionalGeneration' object has no attribute 'image_length'