InternGPT (iGPT) is an open source demo platform where you can easily showcase your AI models. Now it supports DragGAN, ChatGPT, ImageBind, multimodal chat like GPT-4, SAM, interactive image editing, etc. Try it at igpt.opengvlab.com (支持DragGAN、ChatGPT、ImageBind、SAM的在线Demo系统)
(igpt) host:~/fa/InternGPT$ python -u app.py --load "ImageOCRRecognition_cuda:0,Text2Image_cuda:0,SegmentAnything_cuda:0,ActionRecognition_cuda:0,VideoCaption_cuda:0,DenseCaption_cuda:0,ReplaceMaskedAnything_cuda:0,LDMInpainting_cuda:0,SegText2Image_cuda:0,ScribbleText2Image_cuda:0,Image2Scribble_cuda:0,Image2Canny_cuda:0,CannyText2Image_cuda:0,StyleGAN_cuda:0,Anything2Image_cuda:0,HuskyVQA_cuda:0" -e -p 3456 --https
[07/19 11:24:32] bark.generation WARNING: torch version does not support flash attention. You will get faster inference speed by upgrade torch to newest nightly version.
Initializing InternGPT, load_dict={'ImageOCRRecognition': 'cuda:0', 'Text2Image': 'cuda:0', 'SegmentAnything': 'cuda:0', 'ActionRecognition': 'cuda:0', 'VideoCaption': 'cuda:0', 'DenseCaption': 'cuda:0', 'ReplaceMaskedAnything': 'cuda:0', 'LDMInpainting': 'cuda:0', 'SegText2Image': 'cuda:0', 'ScribbleText2Image': 'cuda:0', 'Image2Scribble': 'cuda:0', 'Image2Canny': 'cuda:0', 'CannyText2Image': 'cuda:0', 'StyleGAN': 'cuda:0', 'Anything2Image': 'cuda:0', 'HuskyVQA': 'cuda:0'}
Initializing ImageOCRRecognition to cuda:0
Initializing Text2Image to cuda:0
text_config_dict is provided which will be used to initialize CLIPTextConfig. The value text_config["id2label"] will be overriden.
Initializing SegmentAnything to cuda:0
Traceback (most recent call last):
File "app.py", line 225, in
bot = ConversationBot(load_dict=load_dict, e_mode=args.e_mode)
File "/home/ubuntu/fa/InternGPT/iGPT/controllers/ConversationBot.py", line 144, in init
self.models[class_name] = globals()class_name
File "/home/ubuntu/fa/InternGPT/iGPT/models/image.py", line 672, in init
self.sam = sam_model_registrymodel_type
File "/home/ubuntu/anaconda3/envs/igpt/lib/python3.8/site-packages/segment_anything/build_sam.py", line 15, in build_sam_vit_h
return _build_sam(
File "/home/ubuntu/anaconda3/envs/igpt/lib/python3.8/site-packages/segment_anything/build_sam.py", line 105, in _build_sam
state_dict = torch.load(f)
File "/home/ubuntu/anaconda3/envs/igpt/lib/python3.8/site-packages/torch/serialization.py", line 795, in load
return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args)
File "/home/ubuntu/anaconda3/envs/igpt/lib/python3.8/site-packages/torch/serialization.py", line 1002, in _legacy_load
magic_number = pickle_module.load(f, pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
I get the following error:
(igpt) host:~/fa/InternGPT$ python -u app.py --load "ImageOCRRecognition_cuda:0,Text2Image_cuda:0,SegmentAnything_cuda:0,ActionRecognition_cuda:0,VideoCaption_cuda:0,DenseCaption_cuda:0,ReplaceMaskedAnything_cuda:0,LDMInpainting_cuda:0,SegText2Image_cuda:0,ScribbleText2Image_cuda:0,Image2Scribble_cuda:0,Image2Canny_cuda:0,CannyText2Image_cuda:0,StyleGAN_cuda:0,Anything2Image_cuda:0,HuskyVQA_cuda:0" -e -p 3456 --https [07/19 11:24:32] bark.generation WARNING: torch version does not support flash attention. You will get faster inference speed by upgrade torch to newest nightly version. Initializing InternGPT, load_dict={'ImageOCRRecognition': 'cuda:0', 'Text2Image': 'cuda:0', 'SegmentAnything': 'cuda:0', 'ActionRecognition': 'cuda:0', 'VideoCaption': 'cuda:0', 'DenseCaption': 'cuda:0', 'ReplaceMaskedAnything': 'cuda:0', 'LDMInpainting': 'cuda:0', 'SegText2Image': 'cuda:0', 'ScribbleText2Image': 'cuda:0', 'Image2Scribble': 'cuda:0', 'Image2Canny': 'cuda:0', 'CannyText2Image': 'cuda:0', 'StyleGAN': 'cuda:0', 'Anything2Image': 'cuda:0', 'HuskyVQA': 'cuda:0'} Initializing ImageOCRRecognition to cuda:0 Initializing Text2Image to cuda:0
bot = ConversationBot(load_dict=load_dict, e_mode=args.e_mode)
File "/home/ubuntu/fa/InternGPT/iGPT/controllers/ConversationBot.py", line 144, in init
self.models[class_name] = globals()class_name
File "/home/ubuntu/fa/InternGPT/iGPT/models/image.py", line 672, in init
self.sam = sam_model_registrymodel_type
File "/home/ubuntu/anaconda3/envs/igpt/lib/python3.8/site-packages/segment_anything/build_sam.py", line 15, in build_sam_vit_h
return _build_sam(
File "/home/ubuntu/anaconda3/envs/igpt/lib/python3.8/site-packages/segment_anything/build_sam.py", line 105, in _build_sam
state_dict = torch.load(f)
File "/home/ubuntu/anaconda3/envs/igpt/lib/python3.8/site-packages/torch/serialization.py", line 795, in load
return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args)
File "/home/ubuntu/anaconda3/envs/igpt/lib/python3.8/site-packages/torch/serialization.py", line 1002, in _legacy_load
magic_number = pickle_module.load(f, pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
text_config_dict
is provided which will be used to initializeCLIPTextConfig
. The valuetext_config["id2label"]
will be overriden. Initializing SegmentAnything to cuda:0 Traceback (most recent call last): File "app.py", line 225, in