Skip to content

Commit

Permalink
Launcher UI Improvements
Browse files Browse the repository at this point in the history
- Adding an "no-autolaunch" launch option for the launcher, just add it at the end of the target of the "A1111 WebUI (Pin to Taskbar)" shortcut, like the "skip" launch option. This will just launch the WebUI server without opening it, so you can just browser to http://127.0.0.1:7860/ on your preferred browser
- Adding a "Browse" button to browse the WebUI folder
- Replacing the turning arrow with "Reset" for clarity"
- Small UI text & appearance changes*
- Readme Update
  • Loading branch information
Mozoloa committed Feb 9, 2023
1 parent dada3ba commit da8dda2
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 29 deletions.
10 changes: 7 additions & 3 deletions Advanced Installer/A1111's Web UI Autoinstaller.aip
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:3"/>
<ROW Property="Manufacturer" Value="Empire Media Science"/>
<ROW Property="MsiLogging" MultiBuildValue="DefaultBuild:vp"/>
<ROW Property="ProductCode" Value="2057:{3927B33B-3494-4C4C-8F34-52927AA06942} " Type="16"/>
<ROW Property="ProductCode" Value="2057:{D1FDE7EA-EB57-44F3-8B37-5467330958F1} " Type="16"/>
<ROW Property="ProductLanguage" Value="2057"/>
<ROW Property="ProductName" Value="A1111 Web UI Autoinstaller"/>
<ROW Property="ProductVersion" Value="1.6.1"/>
<ROW Property="ProductVersion" Value="1.7.0"/>
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
<ROW Property="UpgradeCode" Value="{ED3F2830-A9E0-46B4-9D7E-C242564349CB}"/>
Expand All @@ -50,14 +50,16 @@
<ROW Directory="InstallDlg" Directory_Parent="TARGETDIR" DefaultDir="INSTAL~1|InstallDlg:dsfd" IsPseudoRoot="1"/>
<ROW Directory="Launcher_Dir" Directory_Parent="APPDIR" DefaultDir="Launcher"/>
<ROW Directory="TARGETDIR" DefaultDir="SourceDir"/>
<ROW Directory="fonts_Dir" Directory_Parent="Launcher_Dir" DefaultDir="fonts"/>
<ROW Directory="regid.199509.com.example_Dir" Directory_Parent="CommonAppDataFolder" DefaultDir="REGID1~1.EXA|regid.1995-09.com.example"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
<ROW Component="AI_CustomARPName" ComponentId="{9A6F4222-BDEC-480F-91CB-FD9389F5CA3A}" Directory_="APPDIR" Attributes="260" KeyPath="DisplayName" Options="1"/>
<ROW Component="AI_CustomARPName" ComponentId="{27B9D3A9-1B82-47F7-B10C-4F1563009D89}" Directory_="APPDIR" Attributes="260" KeyPath="DisplayName" Options="1"/>
<ROW Component="AI_DisableModify" ComponentId="{F2050EAB-4FE0-4037-BD04-5CC3D395CCD6}" Directory_="APPDIR" Attributes="260" KeyPath="NoModify" Options="1"/>
<ROW Component="AI_ExePath" ComponentId="{B811E420-F0BA-4852-9CFC-442518C5004C}" Directory_="APPDIR" Attributes="260" KeyPath="AI_ExePath"/>
<ROW Component="APPDIR" ComponentId="{8CF866A2-A911-49F3-990F-8C58E2C86E81}" Directory_="APPDIR" Attributes="0"/>
<ROW Component="InstallDlg" ComponentId="{43D6052F-DBBE-4963-A5D7-1DA28EDA7216}" Directory_="InstallDlg" Attributes="0"/>
<ROW Component="NotoEmojiRegular.ttf" ComponentId="{2B2D9D58-2632-4421-8729-39EE5702CFAF}" Directory_="fonts_Dir" Attributes="0" Type="0"/>
<ROW Component="ProductInformation" ComponentId="{89B7657B-A9AC-47E0-934E-DFD5C27F709B}" Directory_="APPDIR" Attributes="260" KeyPath="Version"/>
<ROW Component="definitions.json" ComponentId="{6A0F435C-A63A-448F-9ED7-320D31F7F1E2}" Directory_="Launcher_Dir" Attributes="0" KeyPath="definitions.json" Type="0"/>
<ROW Component="regid.199509.com.example" ComponentId="{CED1F5AE-CD32-43C2-B701-4C359940B9A3}" Directory_="regid.199509.com.example_Dir" Attributes="0"/>
Expand All @@ -72,6 +74,7 @@
<ROW File="LauncherUI.ps1" Component_="definitions.json" FileName="LAUNCH~1.PS1|LauncherUI.ps1" Attributes="0" SourcePath="Launcher\LauncherUI.ps1" SelfReg="false"/>
<ROW File="logger.psm1" Component_="definitions.json" FileName="LOGGER~1.PSM|logger.psm1" Attributes="0" SourcePath="Launcher\logger.psm1" SelfReg="false"/>
<ROW File="shared.ps1" Component_="definitions.json" FileName="shared.ps1" Attributes="0" SourcePath="Launcher\shared.ps1" SelfReg="false"/>
<ROW File="NotoEmojiRegular.ttf" Component_="NotoEmojiRegular.ttf" FileName="NOTOEM~1.TTF|NotoEmoji-Regular.ttf" Attributes="0" SourcePath="Launcher\fonts\NotoEmoji-Regular.ttf" SelfReg="false"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.custcomp.AiComponentAliasComponent">
<ROW AliasRowId="InstallDlg" AliasRowOperation="1"/>
Expand Down Expand Up @@ -356,6 +359,7 @@
<ROW Feature_="MainFeature" Component_="InstallDlg"/>
<ROW Feature_="MainFeature" Component_="definitions.json"/>
<ROW Feature_="MainFeature" Component_="AI_ExePath"/>
<ROW Feature_="MainFeature" Component_="NotoEmojiRegular.ttf"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
<ROW Name="logoAlpha.exe" SourcePath="Advanced Installer\Looks\Exports\logoAlpha.ico" Index="0"/>
Expand Down
64 changes: 41 additions & 23 deletions Launcher/LauncherUI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ function Invoke-WebUI {
$env:GIT_PYTHON_GIT_EXECUTABLE = "$gitPath"
$env:GIT = $gitPath
#>
$env:COMMANDLINE_ARGS = "--autolaunch " + $arguments
$autolaunch = "--autolaunch "
if ($Global:args -contains "no-autolaunch") {
$autolaunch = ""
}
$env:COMMANDLINE_ARGS = $autolaunch + $arguments

Start-Process "$webuiPath/webui.bat" -NoNewWindow
Set-Location $PSScriptRoot
Expand Down Expand Up @@ -122,13 +126,13 @@ function Makeform {
$form.StartPosition = 'CenterScreen'
$form.BackColor = $backgroundColor
$form.ForeColor = $accentColor
$form.Font = "Segoe UI"
$Form.Font = New-Object System.Drawing.Font("Segoe UI Emoji", 9, [System.Drawing.FontStyle]::Regular)
$form.AllowTransparency = $true
$form.FormBorderStyle = "FixedSingle"
$form.ControlBox = $false
$form.AutoSize = $true
$form.Padding = 20
$form.Size = "350,500"
$form.Size = "350, 500"

$versionLabel = New-Object System.Windows.Forms.Label
$versionLabel.Text = "Launcher V$($Version.Long)"
Expand All @@ -138,8 +142,8 @@ function Makeform {
$title = New-Object System.Windows.Forms.Label
$title.Text = "AUTOMATIC1111 WEBUI"
$title.Font = New-Object System.Drawing.Font("Segoe UI", 12, [System.Drawing.FontStyle]::Regular)
$title.Size = "50,40"
$title.Padding = "0,0,0,10"
$title.Size = "50, 40"
$title.Padding = "0, 0, 0, 10"
$title.Dock = "Top"
$title.TextAlign = "middlecenter"
$form.Controls.Add($title)
Expand All @@ -149,33 +153,47 @@ function Makeform {
$GeneralContainer.Dock = "Bottom"
$GeneralContainer.BackColor = $buttonColor
$GeneralContainer.AutoSize = $true
$GeneralContainer.Padding = "10,5,10,0"
$GeneralContainer.Padding = "10, 5, 10, 0"

$GeneralDesc = New-Object System.Windows.Forms.Label
$GeneralDesc.Text = "General Settings"
$GeneralDesc.TextAlign = "MiddleCenter"
$GeneralDesc.Text = "WebUI Maintenance"
<# $GeneralDesc.TextAlign = "LeftCenter" #>
$GeneralDesc.Dock = "Bottom"

$GeneralContainer.Controls.Add($GeneralDesc)

$browseBTN = New-Object System.Windows.Forms.Button
$browseBTN.Text = "Browse"
$browseBTN.Font = New-Object System.Drawing.Font("Segoe UI", 7, [System.Drawing.FontStyle]::Regular)
$browseBTN.BackColor = "Black"
$browseBTN.Add_Click({
Start-Process explorer $webuiPath
})
$browseBTN.Size = "45, 20"
$browseBTN.Dock = "Right"
$browseBTN.Margin = "0, 20, 0, 0"
$GeneralContainer.Controls.Add($browseBTN)

$cleanBTN = New-Object System.Windows.Forms.Button
$cleanBTN.Text = "$([char]0x21BA)"
$cleanBTN.Font = New-Object System.Drawing.Font("Segoe UI", 7, [System.Drawing.FontStyle]::Regular)
$cleanBTN.Text = "Reset"
$cleanBTN.BackColor = "Black"
$cleanBTN.ForeColor = "Red"
$cleanBTN.Add_Click({
Reset-WebUI
})
$cleanBTN.Size = "20, 20"
$cleanBTN.Size = "40, 20"
$cleanBTN.Dock = "Right"
$cleanBTN.Margin = "0,20,0,0"
$cleanBTN.Margin = "0, 20, 0, 0"
$GeneralContainer.Controls.Add($cleanBTN)

$UIparams = foreach ($def in $defs) {
$setting = $settings | Where-Object { $_.arg -eq $def.arg }
if ($def.type -eq "git") {
$gitContainer = New-Object System.Windows.Forms.Panel
$gitContainer.Dock = "Bottom"
$gitContainer.Size = "150,50"
$gitContainer.Padding = "0,5,0,5"
$gitContainer.Size = "150, 50"
$gitContainer.Padding = "0, 5, 0, 5"

$UIparam = New-Object System.Windows.Forms.Checkbox
$UIparam.Checked = $setting.enabled
Expand Down Expand Up @@ -233,7 +251,7 @@ function Makeform {
$ArgContainer = New-Object System.Windows.Forms.Panel
$ArgContainer.Dock = "Bottom"
$ArgContainer.AutoSize = $true
$ArgContainer.Padding = "10,10,10,5"
$ArgContainer.Padding = "10, 10, 10, 5"

$ArgDesc = New-Object System.Windows.Forms.Label
$ArgDesc.Text = "Launch Options"
Expand Down Expand Up @@ -298,7 +316,7 @@ function Makeform {
$addDesc = New-Object System.Windows.Forms.LinkLabel
$addDesc.LinkColor = $accentColor
$addDesc.LinkBehavior = [System.Windows.Forms.LinkBehavior]::NeverUnderline;
$addDesc.Text = "Additional Launch Options (Click Here to See The List)"
$addDesc.Text = "Additional Launch Options (?)"
$addDesc.TextAlign = "MiddleCenter"
$addDesc.Dock = "Bottom"
$addDesc.Size = "200, 20"
Expand All @@ -310,7 +328,7 @@ function Makeform {
$additional = New-Object System.Windows.Forms.RichTextBox
$additional.Name = "add"
$additional.Dock = "Bottom"
$additional.Size = "100,50"
$additional.Size = "100, 50"
$additional.Text = $adds.value
$additional.ShortcutsEnabled = $true
$additional.ScrollBars = "Vertical"
Expand Down Expand Up @@ -339,7 +357,7 @@ function Makeform {

$ArgsField = New-Object System.Windows.Forms.TextBox
$ArgsField.Multiline = $true
$ArgsField.Size = "1000,60"
$ArgsField.Size = "1000, 60"
$ArgsField.ScrollBars = "Vertical"
$ArgsField.Dock = "Bottom"
$ArgsField.ReadOnly = $true
Expand All @@ -353,13 +371,13 @@ function Makeform {

$runbox = New-Object System.Windows.Forms.Panel
$runbox.Dock = "Bottom"
$runbox.Padding = "0,15,0,0"
$runbox.Padding = "0, 15, 0, 0"

#Run
$Runbutton = New-Object System.Windows.Forms.Button
$Runbutton.Dock = "Top"
$Runbutton.Text = "LAUNCH WEBUI"
$Runbutton.Size = "50,40"
$Runbutton.Size = "50, 40"
$Runbutton.ForeColor = $accentColor
$Runbutton.Add_Click({
Invoke-WebUI $settings
Expand All @@ -372,7 +390,7 @@ function Makeform {
$Exitbutton = New-Object System.Windows.Forms.Button
$Exitbutton.Dock = "Bottom"
$Exitbutton.Text = "EXIT"
$Exitbutton.Size = "50,30"
$Exitbutton.Size = "50, 30"
$Exitbutton.ForeColor = "White"
$Exitbutton.Add_Click({
$form.Close()
Expand All @@ -386,7 +404,7 @@ function Makeform {

$HWContainer = New-Object System.Windows.Forms.Panel
$HWContainer.Dock = "Bottom"
$HWContainer.Size = "1000,80"
$HWContainer.Size = "1000, 80"

$GPULabel = New-Object System.Windows.Forms.Label
$GPULabel.Text = $GPUText
Expand All @@ -413,7 +431,7 @@ function Makeform {
$helpLabel.LinkBehavior = [System.Windows.Forms.LinkBehavior]::NeverUnderline;
$helpLabel.Add_Click({ Start-Process "https://github.com/EmpireMediaScience/A1111-Web-UI-Installer/issues" })
$helpLabel.Dock = "Bottom"
$helpLabel.Size = "1000,15"
$helpLabel.Size = "1000, 15"
$helpLabel.TextAlign = "MiddleCenter"
$HWContainer.Controls.Add($helpLabel)

Expand All @@ -423,7 +441,7 @@ function Makeform {
$LhelpLabel.LinkBehavior = [System.Windows.Forms.LinkBehavior]::NeverUnderline;
$LhelpLabel.Add_Click({ Start-Process "https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/new/choose" })
$LhelpLabel.Dock = "Bottom"
$LhelpLabel.Size = "1000,15"
$LhelpLabel.Size = "1000, 15"
$LhelpLabel.TextAlign = "MiddleCenter"
$HWContainer.Controls.Add($LhelpLabel)

Expand Down
2 changes: 1 addition & 1 deletion Launcher/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git"
},
{
"name": "Clear Generated Images",
"name": "Clear All Generations",
"arg": "git-ClearOutputs",
"Description": "Clear all generated images at launch",
"type": "git"
Expand Down
Binary file modified Media/Launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ When double clicking ***A1111 WebUI (Pin to Taskbar)*** You should be greeted wi

## Features

## **`General Settings`**
- **The red <kbd>↺</kbd> button**: This will wipe the *stable-diffusion-webui* folder and reclone it from github
## **`WebUI Maintenance Settings`**
- **<kbd>Browse</kbd>**: This will browse to the WebUI folder
- **<kbd>Reset</kbd>**: This will wipe the *stable-diffusion-webui* folder and reclone it from github
> ⚠️ The folder is permanently deleted so make some back ups if needed ! A pop up will ask you for confirmation
- [x] **Auto-Update WebUI** : This will update (git pull) the WebUI everytime you launch it
- [x] **Auto-Update Extensions** : Same thing but with the extensions
Expand Down

0 comments on commit da8dda2

Please sign in to comment.