mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-17 11:50:18 +08:00
Merge pull request #14537 from akx/gradio-analytics-enabled-again
Ensure GRADIO_ANALYTICS_ENABLED is set early enough
This commit is contained in:
commit
6ffbff0857
@ -1,5 +1,6 @@
|
|||||||
import importlib
|
import importlib
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
@ -18,6 +19,7 @@ def imports():
|
|||||||
warnings.filterwarnings(action="ignore", category=DeprecationWarning, module="pytorch_lightning")
|
warnings.filterwarnings(action="ignore", category=DeprecationWarning, module="pytorch_lightning")
|
||||||
warnings.filterwarnings(action="ignore", category=UserWarning, module="torchvision")
|
warnings.filterwarnings(action="ignore", category=UserWarning, module="torchvision")
|
||||||
|
|
||||||
|
os.environ.setdefault('GRADIO_ANALYTICS_ENABLED', 'False')
|
||||||
import gradio # noqa: F401
|
import gradio # noqa: F401
|
||||||
startup_timer.record("import gradio")
|
startup_timer.record("import gradio")
|
||||||
|
|
||||||
|
@ -27,8 +27,7 @@ dir_repos = "repositories"
|
|||||||
# Whether to default to printing command output
|
# Whether to default to printing command output
|
||||||
default_command_live = (os.environ.get('WEBUI_LAUNCH_LIVE_OUTPUT') == "1")
|
default_command_live = (os.environ.get('WEBUI_LAUNCH_LIVE_OUTPUT') == "1")
|
||||||
|
|
||||||
if 'GRADIO_ANALYTICS_ENABLED' not in os.environ:
|
os.environ.setdefault('GRADIO_ANALYTICS_ENABLED', 'False')
|
||||||
os.environ['GRADIO_ANALYTICS_ENABLED'] = 'False'
|
|
||||||
|
|
||||||
|
|
||||||
def check_python_version():
|
def check_python_version():
|
||||||
|
Loading…
Reference in New Issue
Block a user