Skip to content

Commit

Permalink
Adding a warning if the wrong python 3.10 is installed
Browse files Browse the repository at this point in the history
Minor model prompt fix
  • Loading branch information
Mozoloa committed Feb 7, 2023
1 parent 88cfd6a commit dada3ba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 3 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:{386E2F1A-0129-453C-BA2A-B5561CA4A277} " Type="16"/>
<ROW Property="ProductCode" Value="2057:{3927B33B-3494-4C4C-8F34-52927AA06942} " Type="16"/>
<ROW Property="ProductLanguage" Value="2057"/>
<ROW Property="ProductName" Value="A1111 Web UI Autoinstaller"/>
<ROW Property="ProductVersion" Value="1.6.0"/>
<ROW Property="ProductVersion" Value="1.6.1"/>
<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 @@ -53,7 +53,7 @@
<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="{B0BBE197-A8A6-42FE-98F6-7C9802A03333}" Directory_="APPDIR" Attributes="260" KeyPath="DisplayName" Options="1"/>
<ROW Component="AI_CustomARPName" ComponentId="{9A6F4222-BDEC-480F-91CB-FD9389F5CA3A}" 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"/>
Expand Down
14 changes: 11 additions & 3 deletions Launcher/Functions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ function Search-RegForPyPath {
foreach ($path in $regPaths) {
$pyCore = Get-ItemProperty -Path $path -ErrorAction SilentlyContinue
if ($pyCore) {
$pyPath = Split-Path $pyCore.ExecutablePath -Parent
logger.info "Python 3.10 found in registry:" "$pyPath"
$pyPath = $pyCore.'(default)'
$pyVersion = (Get-Command -Name "$pyPath\python.exe").Version
logger.info "Python $pyVersion found in registry:" "$pyPath"
if ($pyVersion -notlike "3.10.6150.1013") {
$Exprompt = [system.windows.messagebox]::Show("You've installed Python 3.10 ($pyVersion) previously, but it is not the right version. This could lead to errors.`n`nTo fix this, uninstall all the versions of Python 3.10 from your system and restart the launcher`n`nDo you want to continue anyway ?", "Python $pyVersion not recommended", 'YesNo')
logger.warn "This is not the recommended version of Python and will probably cause errors"
if ($Exprompt -eq "No") {
exit
}
}
return $pyPath
}
}
Expand Down Expand Up @@ -81,7 +89,7 @@ function Reset-WebUI {
function Import-BaseModel {
$ckptDirSetting = $settings | Where-Object { $_.arg -eq "ckpt-dir" }
if (($ckptDirSetting.enabled -eq $false) -and !(Get-ChildItem $modelsPath | Where-Object { $_.extension -ne ".txt" })) {
$Exprompt = [system.windows.messagebox]::Show("No model was found on your installation, do you want to download the Stable Diffusion 1.5 base model ?`n`nIf you don't know what that is, you probably want to click Yes`n`nThis will take a while so be patient", 'Confirmation', 'YesNo')
$Exprompt = [system.windows.messagebox]::Show("No model was found on your installation, do you want to download the Stable Diffusion 1.5 base model ?`n`nIf you don't know what that is, you probably want to click Yes`n`nThis will take a while so be patient", 'Install SD 1.5 Model ?', 'YesNo')
if ($Exprompt -eq "Yes") {
$url = "https://anga.tv/ems/model.ckpt"
$destination = "$modelsPath\SD15NewVAEpruned.ckpt"
Expand Down

0 comments on commit dada3ba

Please sign in to comment.