Open huanghan2001 opened 1 year ago
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ D:\anaconda3\envs\visgpt\visual-chatgpt-main\visual_chatgpt.py:940 in │ │ │ │ 937 │ │ return state, state, txt + ' ' + image_filename + ' ' │ │ 938 │ │ 939 if name == 'main': │ │ ❱ 940 │ bot = ConversationBot() │ │ 941 │ with gr.Blocks(css="#chatbot .overflow-y-auto{height:500px}") as demo: │ │ 942 │ │ chatbot = gr.Chatbot(elem_id="chatbot", label="Visual ChatGPT") │ │ 943 │ │ state = gr.State([]) │ │ │ │ D:\anaconda3\envs\visgpt\visual-chatgpt-main\visual_chatgpt.py:833 in init │ │ │ │ 830 │ │ │ Tool(name="Generate Image From User Input Text", func=self.t2i.inference, │ │ 831 │ │ │ │ description="useful when you want to generate an image from a user inpu │ │ 832 │ │ │ │ │ │ │ "The input to this tool should be a string, representing th │ │ ❱ 833 │ │ │ Tool(name="Remove Something From The Photo", func=self.edit.remove_part_of_i │ │ 834 │ │ │ │ description="useful when you want to remove and object or something fro │ │ 835 │ │ │ │ │ │ │ "The input to this tool should be a comma seperated string │ │ 836 │ │ │ Tool(name="Replace Something From The Photo", func=self.edit.replace_part_of │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ AttributeError: 'ConversationBot' object has no attribute 'edit' 因为显存不足注释掉了几个模型,把826行相应的tool(...)也注释掉,只保留需要的模型
self.tools里的tool是与上面定义的一堆self成员是对应的,需要同时注释掉,否则要么显存没有降低,要么就出现你这种情况。
Hi @huanghan2001 , we have updated the code, so you can specify the VFMs you like by using --load
, such as --load "ImageCaptioning_cuda:0,Text2Image_cuda:0"
.
Thanks for @wrk226's answer. Thank you all~
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ D:\anaconda3\envs\visgpt\visual-chatgpt-main\visual_chatgpt.py:940 in │
│ │
│ 937 │ │ return state, state, txt + ' ' + image_filename + ' ' │
│ 938 │
│ 939 if name == 'main': │
│ ❱ 940 │ bot = ConversationBot() │
│ 941 │ with gr.Blocks(css="#chatbot .overflow-y-auto{height:500px}") as demo: │
│ 942 │ │ chatbot = gr.Chatbot(elem_id="chatbot", label="Visual ChatGPT") │
│ 943 │ │ state = gr.State([]) │
│ │
│ D:\anaconda3\envs\visgpt\visual-chatgpt-main\visual_chatgpt.py:833 in init │
│ │
│ 830 │ │ │ Tool(name="Generate Image From User Input Text", func=self.t2i.inference, │
│ 831 │ │ │ │ description="useful when you want to generate an image from a user inpu │
│ 832 │ │ │ │ │ │ │ "The input to this tool should be a string, representing th │
│ ❱ 833 │ │ │ Tool(name="Remove Something From The Photo", func=self.edit.remove_part_of_i │
│ 834 │ │ │ │ description="useful when you want to remove and object or something fro │
│ 835 │ │ │ │ │ │ │ "The input to this tool should be a comma seperated string │
│ 836 │ │ │ Tool(name="Replace Something From The Photo", func=self.edit.replace_part_of │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'ConversationBot' object has no attribute 'edit'