Hide Triton warning on Windows

Triton doesnt work on Windows so hide the error
This commit is contained in:
pythongosssss 2023-02-16 18:19:26 +00:00 committed by GitHub
parent 56498d505a
commit 0787299610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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