1
0
Fork 0

fix(api): silence controlnet registration warnings

This commit is contained in:
Sean Sube 2023-12-21 21:30:49 -06:00
parent 2546084208
commit ccff9a3136
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 26 additions and 13 deletions

View File

@ -44,6 +44,10 @@ warnings.filterwarnings(
"ignore", "ignore",
".*Converting a tensor to a Python boolean might cause the trace to be incorrect.*", ".*Converting a tensor to a Python boolean might cause the trace to be incorrect.*",
) )
warnings.filterwarnings(
"ignore",
".*Overwriting tiny_vit_.*",
)
logger = getLogger(__name__) logger = getLogger(__name__)

View File

@ -1,5 +1,14 @@
# https://github.com/ForserX/StableDiffusionUI/blob/main/data/repo/diffusion_scripts/controlnet_pipe.py # https://github.com/ForserX/StableDiffusionUI/blob/main/data/repo/diffusion_scripts/controlnet_pipe.py
import warnings
warnings.filterwarnings(
"ignore",
".*Overwriting tiny_vit_.*",
)
# from https://stackoverflow.com/a/65418681
if True: # noqa: E402
from logging import getLogger from logging import getLogger
from os import path from os import path