mirror of
https://github.com/openvinotoolkit/stable-diffusion-webui.git
synced 2024-12-14 22:53:25 +03:00
Redirect Gradio phone home request
This request is sent regardless of Gradio analytics being enabled or not via the env var. Idea from text-generation-webui.
This commit is contained in:
parent
b4ad31ddd4
commit
b14e23529f
9
webui.py
9
webui.py
@ -28,7 +28,16 @@ warnings.filterwarnings(action="ignore", category=UserWarning, module="torchvisi
|
||||
|
||||
startup_timer.record("import torch")
|
||||
|
||||
import requests
|
||||
def gradio_get(url, **kwargs):
|
||||
kwargs.setdefault('allow_redirects', True)
|
||||
return requests.api.request('get', 'http://127.0.0.1/', **kwargs)
|
||||
|
||||
original_get = requests.get
|
||||
requests.get = gradio_get
|
||||
import gradio
|
||||
requests.get = original_get
|
||||
|
||||
startup_timer.record("import gradio")
|
||||
|
||||
import ldm.modules.encoders.modules # noqa: F401
|
||||
|
Loading…
Reference in New Issue
Block a user