Skip to content

Instantly share code, notes, and snippets.

@ha1t
Last active April 4, 2023 03:20
Show Gist options
  • Select an option

  • Save ha1t/101573dbc454b9cae53878b8f05012a5 to your computer and use it in GitHub Desktop.

Select an option

Save ha1t/101573dbc454b9cae53878b8f05012a5 to your computer and use it in GitHub Desktop.
Stable Diffusionの run.bat に cscript local_ip.vbs を追加することで、自分のIP付きのURLを出せる
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objItem in colItems
If Not IsNull(objItem.IPAddress) Then
For Each strIPAddress in objItem.IPAddress
WScript.Echo "IP Address: http://" & strIPAddress & ":7860"
Next
End If
Next
@echo off
cscript local_ip.vbs
call environment.bat
cd %~dp0webui
call webui-user.bat
@echo off
set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--xformers --listen
call webui.bat
@ha1t

ha1t commented Apr 4, 2023

Copy link
Copy Markdown
Author

WindowsファイアウォールでTCPポート 7860 の開放を忘れない。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment