lllyasviel / lllyasviel/stable-diffusion-webui-forge

[feature] menu improvements [select specific version]

Open
#1,216 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

I made a change to the run.bat in the one click installer so people can change versions and get around the latest update issues

just replace the contents of run.bat and you can then delete the update.bat file if you want.

```
@echo off
call environment.bat

:menu
cls
echo Current commit:
git -C "%~dp0webui" rev-parse --short HEAD
echo Last commit message:
git -C "%~dp0webui" log -1 --pretty=%%B

echo.
echo Choose an option:
echo 1. Run webui
echo 2. Update to latest version
echo 3. Checkout specific commit
echo 4. Apply pull request

set choice=
set /p choice=Enter your choice (1-4) or just hit enter for default (Run webui):

if "%choice%"=="" set choice=1
if "%choice%"=="1" goto run_webui
if "%choice%"=="2" goto latest
if "%choice%"=="3" goto version
if "%choice%"=="4" goto pullrequest
echo Invalid choice. Please try again.
pause
goto menu

:latest
git -C "%~dp0webui" pull 2>NUL
if %ERRORLEVEL% == 0 (
echo Update successful.
) else (
git -C "%~dp0webui" reset --hard
git -C "%~dp0webui" pull
echo Update complete after reset.
)
pause
goto menu

:version
git -C "%~dp0webui" log --oneline -n 10
echo.
set /p commit=Enter the commit hash to checkout (or 'q' to cancel):
if "%commit%"=="q" goto menu
git -C "%~dp0webui" checkout %commit%
if %ERRORLEVEL% == 0 (
echo Checkout complete.
) else (
echo Checkout failed. Please check the commit hash and try again.
)
pause
goto menu

:pullrequest
set /p pr=Enter the pull request number:
git -C "%~dp0webui" fetch origin pull/%pr%/head:pr-%pr%
git -C "%~dp0webui" checkout pr-%pr%
if %ERRORLEVEL% == 0 (
echo Pull request applied.
) else (
echo Failed to apply pull request. Please check the PR number and try again.
)
pause
goto menu

:run_webui
cd "%~dp0webui"
call webui-user.bat
goto end

:end
pause
```

quick edit to change from tags to commits as tags are sparse in this project

could use more information like the silly tavern one has https://github.com/SillyTavern/SillyTavern-Launcher

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the one-click installer’s run.bat, along with update.bat, environment.bat, and webui-user.bat. Run the installer on Windows and verify that the menu can launch the web UI, update to the latest version, check out a selected commit, and apply a pull request while preserving the default run option.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.