from groundingdino import _C
导入失败
warnings.warn("Failed to load custom C++ ops. Running on CPU mode Only!")
发生异常: NameError
name '_C' is not defined
File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 53, in forward
output = _C.ms_deform_attn_forward(
File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 338, in forward
output = MultiScaleDeformableAttnFunction.apply(
File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/transformer.py", line 793, in forward
src2 = self.self_attn(
File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/transformer.py", line 584, in forward
output = checkpoint.checkpoint(
File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/transformer.py", line 266, in forward
memory, memory_text = self.encoder(
File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/groundingdino.py", line 334, in forward
hs, reference, hs_enc, ref_enc, init_box_proposal = self.transformer(
File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/util/inference.py", line 79, in predict
outputs = model(image[None], captions=[caption])
File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/util/inference.py", line 218, in predict_with_classes
boxes, logits, phrases = predict(
File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/detectSam.py", line 100, in process_image
detections = detect_model.predict_with_classes(
File "/home/admin123/repository/lmm/AutoStudio/model/autostudio.py", line 341, in generate
seg_img, detection = process_image(detect_model=dino_model, same_model=same_model, input_image=i[1][0], categories=character_prompt_full, device=self.device)
File "/home/admin123/repository/lmm/AutoStudio/run.py", line 231, in
output = autostudio.generate(
NameError: name '_C' is not defined
python 3.10
from groundingdino import _C 导入失败 warnings.warn("Failed to load custom C++ ops. Running on CPU mode Only!")
发生异常: NameError name '_C' is not defined File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 53, in forward output = _C.ms_deform_attn_forward( File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 338, in forward output = MultiScaleDeformableAttnFunction.apply( File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/transformer.py", line 793, in forward src2 = self.self_attn( File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/transformer.py", line 584, in forward output = checkpoint.checkpoint( File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/transformer.py", line 266, in forward memory, memory_text = self.encoder( File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/models/GroundingDINO/groundingdino.py", line 334, in forward hs, reference, hs_enc, ref_enc, init_box_proposal = self.transformer( File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/util/inference.py", line 79, in predict outputs = model(image[None], captions=[caption]) File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/Grounding-DINO/groundingdino/util/inference.py", line 218, in predict_with_classes boxes, logits, phrases = predict( File "/home/admin123/repository/lmm/AutoStudio/DETECT_SAM/detectSam.py", line 100, in process_image detections = detect_model.predict_with_classes( File "/home/admin123/repository/lmm/AutoStudio/model/autostudio.py", line 341, in generate seg_img, detection = process_image(detect_model=dino_model, same_model=same_model, input_image=i[1][0], categories=character_prompt_full, device=self.device) File "/home/admin123/repository/lmm/AutoStudio/run.py", line 231, in
output = autostudio.generate(
NameError: name '_C' is not defined
发现: _C.cpython-38-x86_64-linux-gnu.so _C.cpython-39-x86_64-linux-gnu.so
没有_C.cpython-310-x86_64-linux-gnu.so 这个问题怎么解决?是不是不支持python310?能不能提供3.10的文件