RootKit-Org / AI-Aimbot

World's Best AI Aimbot - CS2, Valorant, Fortnite, APEX, every game
GNU General Public License v3.0
1.25k stars 264 forks source link

'NoneType' object has no attribute 'create_execution_context' #139

Closed SYIRUL94 closed 8 months ago

SYIRUL94 commented 9 months ago

=== All Windows === [2]: Windows PowerShell [3]: Apex Legends [4]: RootKit-Org/AI-Aimbot: World's Best AI Aimbot - CS2, Valorant, Fortnite, APEX, every game - Google Chrome [14]: Program Manager Please enter the number corresponding to the window you'd like to select: 3 Successfully activated the game window... (608, 272, 928, 592) Loading yolov5s320Half.engine for TensorRT inference... [12/16/2023-13:14:00] [TRT] [I] Loaded engine size: 15 MiB [12/16/2023-13:14:00] [TRT] [E] 6: The engine plan file is generated on an incompatible device, expecting compute 8.9 got compute 8.6, please rebuild. [12/16/2023-13:14:00] [TRT] [E] 2: [engine.cpp::nvinfer1::rt::deserializeEngine::951] Error Code 2: Internal Error (Assertion engine->deserialize(start, size, allocator, runtime) failed. ) Traceback (most recent call last): File "C:\Users\syahi\Desktop\AI-Aimbot-main\main_tensorrt.py", line 166, in main() File "C:\Users\syahi\Desktop\AI-Aimbot-main\main_tensorrt.py", line 27, in main model = DetectMultiBackend('yolov5s320Half.engine', device=torch.device( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\syahi\Desktop\AI-Aimbot-main\models\common.py", line 411, in init context = model.create_execution_context() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'create_execution_context' ERROR: 'NoneType' object has no attribute 'create_execution_context' Ask @Wonder for help in our Discord in the #ai-aimbot channel ONLY: https://discord.gg/rootkitorg

anyone face same issue?

mortezaghafoori commented 8 months ago

Yes, I have the same issue. I followed the instructions one by one and if I run main_onnx.py, I have no problems. But, when I try to run main_tensorrt.py I get the exact same error as above. Any fixes yet?

mortezaghafoori commented 8 months ago

=== All Windows === [2]: Windows PowerShell [3]: Apex Legends [4]: RootKit-Org/AI-Aimbot: World's Best AI Aimbot - CS2, Valorant, Fortnite, APEX, every game - Google Chrome [14]: Program Manager Please enter the number corresponding to the window you'd like to select: 3 Successfully activated the game window... (608, 272, 928, 592) Loading yolov5s320Half.engine for TensorRT inference... [12/16/2023-13:14:00] [TRT] [I] Loaded engine size: 15 MiB [12/16/2023-13:14:00] [TRT] [E] 6: The engine plan file is generated on an incompatible device, expecting compute 8.9 got compute 8.6, please rebuild. [12/16/2023-13:14:00] [TRT] [E] 2: [engine.cpp::nvinfer1::rt::deserializeEngine::951] Error Code 2: Internal Error (Assertion engine->deserialize(start, size, allocator, runtime) failed. ) Traceback (most recent call last): File "C:\Users\syahi\Desktop\AI-Aimbot-main\main_tensorrt.py", line 166, in main() File "C:\Users\syahi\Desktop\AI-Aimbot-main\main_tensorrt.py", line 27, in main model = DetectMultiBackend('yolov5s320Half.engine', device=torch.device( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\syahi\Desktop\AI-Aimbot-main\models\common.py", line 411, in init context = model.create_execution_context() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'create_execution_context' ERROR: 'NoneType' object has no attribute 'create_execution_context' Ask @wonder for help in our Discord in the #ai-aimbot channel ONLY: https://discord.gg/rootkitorg

anyone face same issue?

Ok, so after a bit of digging in the files I found out that you must edit the main_tensorrt.py file according to the engine you exported/ For example, if you downloaded the yolov5m.pt and ran the export command, you should have a yolov5m.engine file in your directory. Then, open main_tensorrt.py in notepad and search for yolov5. You should be directed to this line:

Loading Yolo5 Small AI Model

model = DetectMultiBackend('yolov5s320Half.engine', device=torch.device(
    'cuda'), dnn=False, data='', fp16=True)
stride, names, pt = model.stride, model.names, model.pt

just replace the "yolov5s320Half.engine" with "yolov5m.engine". I did that and now it's working as it should. I hope this could help

Qfc9 commented 8 months ago

Just ask Wonder. This is a common issue