From 0787299610c017949d98b5d7d313e0937636e500 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Thu, 16 Feb 2023 18:19:26 +0000 Subject: [PATCH] Hide Triton warning on Windows Triton doesnt work on Windows so hide the error --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index c5f04aa9..f5aec442 100644 --- a/main.py +++ b/main.py @@ -7,6 +7,10 @@ import heapq import traceback import asyncio +if os.name == "nt": + import logging + logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage()) + try: import aiohttp from aiohttp import web