{"id":23303579,"url":"https://github.com/nenotriple/sd-webui-user-selector","last_synced_at":"2025-04-06T23:18:44.828Z","repository":{"id":196600054,"uuid":"696728661","full_name":"Nenotriple/sd-webui-user-selector","owner":"Nenotriple","description":"Select command line arguments upon starting the sd-webui","archived":false,"fork":false,"pushed_at":"2023-10-25T23:16:03.000Z","size":18,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T05:19:10.796Z","etag":null,"topics":["automatic1111","helper-tool","sd-webui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nenotriple.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-26T10:20:21.000Z","updated_at":"2024-01-04T18:59:41.000Z","dependencies_parsed_at":"2023-09-26T12:45:23.919Z","dependency_job_id":"e8961230-9fc4-4cb1-9a3f-c192c47bcecd","html_url":"https://github.com/Nenotriple/sd-webui-user-selector","commit_stats":null,"previous_names":["nenotriple/webui-user-selector","nenotriple/sd-webui-user-selector"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nenotriple%2Fsd-webui-user-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nenotriple%2Fsd-webui-user-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nenotriple%2Fsd-webui-user-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nenotriple%2Fsd-webui-user-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nenotriple","download_url":"https://codeload.github.com/Nenotriple/sd-webui-user-selector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247564038,"owners_count":20958993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automatic1111","helper-tool","sd-webui"],"created_at":"2024-12-20T11:13:02.029Z","updated_at":"2025-04-06T23:18:44.804Z","avatar_url":"https://github.com/Nenotriple.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webui-user-selector.bat\nSelect command-line arguments when starting AUTOMATIC1111's sd-webui\n\n![webui-user-selector_example](https://github.com/Nenotriple/webui-user-selector/assets/70049990/6a82b5fa-529e-4570-baf2-135b3368818d)\n\nFor more information on command-line arguments that can be used in this .bat file, please refer to this wiki page.\n\n[AUTOMATIC1111 sd-webui - Command-Line Arguments and Settings](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings#all-command-line-arguments)\n\n# How to use\n\nSimply place the webui-user-selector.bat file in the \"stable-diffusion-webui\" folder and double-click it.\n\n*(There's no need to replace the original webui-user.bat file)*\n\n# 🍰 _EASY WAY:_ Edit/Add/Remove Options\n\n1. Download the included Python script `webui-user-selector_EDITOR.py`, and run it once to create the settings template.\n\n2. Edit the `webui-user-selector_settings.txt` file with the options you want.\n   - Follow the provided pattern (it's easy).\n   - You can simply copy the `Option` blocks or delete them; just make sure they're numbered correctly.\n   - Use `AND` to run another command, like `call git pull`.\n\n3. When you're done, run the Python script again to create/edit the `webui-user-selector.bat` file.\n\n\n# ⛰️ _HARD WAY:_ Edit/Add/Remove Options\n\n**Understanding the .bat File**\n\nIn the provided .bat file, there are several options (1-4) that a user can select. Each option corresponds to a different set of commands that will be executed.\n\n_Here is the full example batch script:_\n```\n@echo off\n\nset PYTHON=\nset GIT=\nset VENV_DIR=\n\necho Please select an option:\n\necho 1) xformers                        (Fastest)\necho 2) xformers + medvram              (Slower)\necho 3) xformers + lowvram              (Slowest)\necho 4) Update                          (git pull, reinstall xformers, reinstall torch)\n\nchoice /C 1234 /N /M \"Choice (1-4): \"\n\nif errorlevel 4 (\n    echo Updating...\n    set COMMANDLINE_ARGS= --reinstall-xformers --reinstall-torch --xformers\n    call git pull\n) else if errorlevel 3 (\n    echo Starting...\n    set COMMANDLINE_ARGS= --xformers --lowvram\n) else if errorlevel 2 (\n    echo Starting...\n    set COMMANDLINE_ARGS= --xformers --medvram\n) else if errorlevel 1 (\n    echo Starting...\n    set COMMANDLINE_ARGS= --xformers\n)\n\ncall webui.bat\n```\n\n**Editing an Option**\n\nRight click the .bat file and select Edit.\n\nTo edit an option, you need to change the commands that are executed when that option is selected. For example, if you want to change what happens when option 1 is selected, you would edit the following section:\n\n```bat\n) else if errorlevel 1 (\n    echo Starting...\n    set COMMANDLINE_ARGS= --xformers\n)\n```\n\nYou can replace --xformers with any other command you want to execute, or add additional commands.\n\nAfter editing the  `else if errorlevel` block you should update the `echo` line that corresponds to the option name.\n__________\n\n**Adding an Option**\n\nTo add an option, you need to add another `else if errorlevel` block. For example, if you want to add an option 5, you would add the following section:\n\n```\n) else if errorlevel 5 (\n    echo Starting...\n    set COMMANDLINE_ARGS= --new-option\n)\n```\n\nAfter adding a new option you should update/add the `echo` line that corresponds to the option name.\n__________\n\n**Removing an Option**\n\nTo remove an option, simply delete the corresponding `else if errorlevel` block. Then update the appropriate `echo` and `choice` lines.\n__________\n\n**Important Note**\n\nWhenever you add or remove an option, remember to update the `choice /C 1234 /N /M \"Choice (1-4): \"` line. The `/C` parameter should include all possible choices. For example, if you have 5 options, it should be `choice /C 12345 /N /M \"Choice (1-5): \"`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnenotriple%2Fsd-webui-user-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnenotriple%2Fsd-webui-user-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnenotriple%2Fsd-webui-user-selector/lists"}