Commit Graph

1415 Commits

Author SHA1 Message Date
Alejandro Gil
925b45f8a9
Merge branch 'dev' into dependabot/pip/dev/timm-0.6.11 2022-11-02 21:45:00 -07:00
Alejandro Gil
711555b68b
1-click installer and updater. Uses micromamba to install git and conda into a contained environment (if necessary) before running the normal installation script (#1519)
Hi,

This PR enables a user to install this project without requiring them to
have anaconda or git pre-installed. This reduces unnecessary friction
for users who aren't programmers or very technical. If a user already
has anaconda or git pre-installed, these scripts will just pass-through
and won't affect them. Honestly, it's just more straightforward for a
user to use. :)

## Current installation process for a user:
1. Install Anaconda
2. Install Git
3. Run the commands for a git pull (on Windows)
4. Run the webui script

## Suggested new process (for Windows and Linux):
1. Download the `install.bat` or `install.sh` script for their OS
(linked below, or better, from a release on your project)
2. Run the script

That's it.

Main improvement: The user doesn't need to have python/anaconda/git
pre-installed. This reduces unnecessary friction for non-technical
users.

## 1-click Installers:
* Windows:
https://raw.githubusercontent.com/cmdr2/hlky-webui/master/installer/install.bat
* Linux:
https://raw.githubusercontent.com/cmdr2/hlky-webui/master/installer/install.sh

-----

I've tested this on Windows x64 and Linux x64. I've tested this with and
without Anaconda pre-installed. I've also tested it works if the
installer gets interrupted mid-way, and needs to be re-run.

**Disclosure:** I'm the author of the cmdr2 UI and 1-click installer
(https://github.com/cmdr2/stable-diffusion-ui). We use a similar
approach and it's been working quite well (~2k installs/day) for over
1.5 months. None of the support issue have been due to this
bootstrapping process, but rather due to the usual pip failures, VPN
issues, bad system config etc.

## How it works:
1. This script will install git and conda (if not found on the system
PATH) using `micromamba` (an 8mb static-linked single-file binary, conda
replacement). The micromamba binary will be downloaded if necessary
using curl.

For users who already have git and python, this step will be skipped.

2. Next, it'll checkout the project's git repo, if necessary. On Linux,
it'll download and run the
[linux-sd.sh](https://raw.githubusercontent.com/JoshuaKimsey/Linux-StableDiffusion-Script/main/linux-sd.sh)
script, like how the installation guide suggests.

3. Finally, it'll start `webui.cmd` on Windows. On Linux, the
linux-sd.sh script takes care of this step.

After installation, users can continue running `webui.cmd` or `webui.sh`
directly. It'll use either the git/python/conda that was installed
through this installer, or the user's existing git/python/conda
installation.

## Next steps (if you wish to adopt this)
If you're willing, then the next steps are:
1. Merging this PR will get the installer scripts into the `installer`
folder
2. Uploading the installer files to a GitHub release, or using the
upload links inside this PR
3. Updating the README with the download links for the installer. I can
submit the PR for the README, if you're interested.

If you're interested in this, I'd definitely suggest phasing this in
gradually, maybe suggested as an easier alternative on the docs, until
it is judged stable to use.

Thanks! :)


# Checklist:

- [y] I have changed the base branch to `dev`
- [y] I have performed a self-review of my own code
- [y] I have commented my code in hard-to-understand areas
- [y] I have made corresponding changes to the documentation
2022-11-02 21:23:51 -07:00
cmdr2
5e725e036e
Merge branch 'dev' into master 2022-11-03 09:46:25 +05:30
cmdr2
96b568ae09 Add dev-only warning 2022-11-03 09:45:12 +05:30
cmdr2
9501ab855a Add dev-only warning 2022-11-03 09:44:44 +05:30
cmdr2
2769ec22f2 readme.txt for users in the release zip 2022-11-03 09:44:07 +05:30
cmdr2
a00eda9b32 Merge branch 'master' of github.com:cmdr2/hlky-webui 2022-11-03 09:40:52 +05:30
cmdr2
fef5019bda create_installers script 2022-11-03 09:40:42 +05:30
Alejandro Gil
4bde3eacd0
fix: Fixed GPU selection not being saved properly on the Settings page. (#1638) 2022-11-02 15:59:08 -07:00
ZeroCool940711
fa529b432e Merge remote-tracking branch 'origin/dev' into dev 2022-11-02 15:55:20 -07:00
ZeroCool940711
b7c2ceb177 fix: Fixed GPU selection not being saved properly on the Settings page. 2022-11-02 15:51:37 -07:00
Alejandro Gil
62f9706d6a
Added barfi/baklavajs to the Tools menu and added a new post processing tab which is still a work in progress. (#1634)
# Description
- Added a basic implementation of
[Barfi](https://github.com/krish-adi/barfi) under the Tools menu which
should allow us to create nodes for a node/flow based content generation
and potentially allowing us to connect the UI with external apps like
Houdini, Blender,etc.
- Added basic post-processing tab which is still being worked on.
2022-11-01 10:44:07 -07:00
ZeroCool940711
66d0344cf5 Added barfi/baklavajs to the Tools menu and added a new post processing tab which is still a work in progress. 2022-11-01 10:29:44 -07:00
ZeroCool940711
ac2cefd5db Cleaned some commented code that is no longer needed. 2022-11-01 10:25:43 -07:00
ZeroCool940711
cae492c543 Added streamlit-elements and streamlit-ace to the dependencies list. 2022-11-01 10:24:39 -07:00
ZeroCool940711
a47d143ecc More fixes to the layout and padding issues which was causing the UI to jump sometimes. 2022-11-01 10:23:56 -07:00
ZeroCool940711
99a25bc399 Fixed textual inversion not using the 1.5 model and instead still using the old 1.4 model for stable diffusion. 2022-11-01 10:23:17 -07:00
ZeroCool940711
d653c77785 Added Barfi/Baklavajs basic integration for those that want to work implement a node based system for Stable Diffusion inside the UI. 2022-11-01 07:15:53 -07:00
Alejandro Gil
26c5c8590e
Fixed errors when post-processing models aren't installed (#1633)
Fixes #1522, #1604, #1453

LDSR changes in 0c03cedeb9 don't always
set the session_state keys depending on which combination of post
processing models are installed.
Resolves errors such as 
`KeyError: 'st.session_state has no key "use_LDSR"`
`KeyError: 'st.session_state has no key "GFPGAN_model"`

sd_utils changes set these values to defaults when available check fails
The other changes prevent errors if LDSR is installed without RealESRGAN
eg:
`File "scripts\txt2vid.py", line 1788, in layout

index=upscaling_method_list.index(st.session_state['defaults'].general.upscaling_method))
ValueError: 'RealESRGAN' is not in list`
2022-11-01 05:27:48 -07:00
fezeral
10b66cc2b9 Fixed errors when post-processing models aren't installed
Fixes #1522, #1604
2022-11-01 17:26:47 +10:30
Alejandro Gil
d8e61a5cd3
Added support for webp images in the img2txt tab. (#1632) 2022-10-31 13:39:09 -07:00
ZeroCool940711
9a9c357922 Added support for webp images in the img2txt tab 2022-10-31 13:38:31 -07:00
Alejandro Gil
90b4414096
Increased the padding right distance by 5px which fixes the issue of the UI jumping sometimes because the image full screen icon was overlapping the scrollbar. (#1631) 2022-10-31 13:37:38 -07:00
ZeroCool940711
dd71400951 Merge remote-tracking branch 'origin/dev' into dev 2022-10-31 13:34:29 -07:00
ZeroCool940711
f82a91333a Increased the padding right distance by 5px which fixes the issue of the UI jumping sometimes because the image full screen icon was overlapping the scrollbar. 2022-10-31 13:34:23 -07:00
Alejandro Gil
e13132c78c
Reverted txt2vid to use the StableDiffusionPipeline instead of StableDiffusionWalkPipeline when loading the model. (#1630) 2022-10-31 07:15:19 -07:00
ZeroCool940711
2ea2606e83 Reverted txt2vid to use the StableDiffusionPipeline instead of StableDiffusionWalkPipeline when loading the model. 2022-10-31 06:50:21 -07:00
ZeroCool940711
25acf77260 Added menu item for the Fine Tunning tab which will be implemented in the near future. 2022-10-31 05:37:41 -07:00
ZeroCool940711
e73e0c45b0 Removed unnecessary code from previous iteration of the gallery tab as its no longer needed. 2022-10-31 05:36:43 -07:00
ZeroCool940711
928ce11b51 Changed text on the txt2vid to point people to Settings page where they can add their huggingface token. 2022-10-31 02:31:00 -07:00
Alejandro Gil
1cb5ba74b2
Added note at top of colab to remind people to enable a gpu backend. (#1628)
# Description

as above. in case your grandma wants to use it.

# Checklist:

- [x] I have changed the base branch to `dev`
- [x] I have performed a self-review of my own code
- [x] I have commented my code in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
2022-10-30 07:21:00 -07:00
aedh carrick
a848240014
typo 2022-10-30 08:54:46 -05:00
aedh carrick
7633f02631 added reminder to choose gpu backend in colab 2022-10-30 08:49:47 -05:00
Alejandro Gil
fccc12a806
Allow users to set their stable horde api key on the settings page. (#1627) 2022-10-30 04:26:33 -07:00
ZeroCool940711
83aa96e0d9 Changed txt2img to properly take the stable horde api from the settings page as it was not taking it from there but had a fixed value before. This means every time you had to manually add the api key, now you can just add it on the settings page once and it will be used from there. 2022-10-30 04:23:29 -07:00
ZeroCool940711
e66bb398e9 Merge remote-tracking branch 'origin/dev' into dev 2022-10-30 03:36:49 -07:00
ZeroCool940711
f23f5253ac Allow users to set their stable horde api key on the Settings page. 2022-10-30 03:36:30 -07:00
ZeroCool940711
d1d672fcfb Added default stable horde api for anonymous usage. 2022-10-30 03:35:52 -07:00
Alejandro Gil
6e5221eb20
Removed the gallery message as its not needed. (#1626) 2022-10-29 23:46:18 -07:00
Alejandro Gil
035ed25c7e
Merge branch 'Sygil-Dev:dev' into dev 2022-10-29 23:45:52 -07:00
ZeroCool940711
8b638b338d Removed the gallery message as its not needed. 2022-10-29 23:45:27 -07:00
Alejandro Gil
599db4147c
Removed message shown on the gallery tab when empty which was still shown even when it was not empty. (#1625) 2022-10-29 22:41:19 -07:00
ZeroCool940711
3e1ef82378 Removed unnecessary log message which was causing confusing, this feature is something that works depending on the model loaded. 2022-10-29 22:24:36 -07:00
ZeroCool940711
658646eed2 Removed message shown on the gallery tab when empty which was still shown even when it was not empty. 2022-10-29 22:23:31 -07:00
Alejandro Gil
5d3feebfd0
Added cell to prefetch models. (#1619)
# Description

Added a config cell for the Colab instance. Now it can pre-fetch models.
Folder on Google drive can be specified. If models are found there, they
will be symlinked instead of downloaded. Any models found in folder, but
not in download list, will be symlinked to models/custom. Also added
comments to code and titles to cells.
Should just be able to enter settings in first cell, then hit 'run all'.
Well... twice.

# Checklist:

- [x] I have changed the base branch to `dev`
- [x] I have performed a self-review of my own code
- [x] I have commented my code in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
2022-10-29 10:02:12 -07:00
Alejandro Gil
56b2ba8963
Merge branch 'dev' into patch-2 2022-10-29 09:57:21 -07:00
Alejandro Gil
c5981694c3
Fixed the serverAddress default value stopping people from using the UI in services like runpod. (#1621) 2022-10-29 09:56:50 -07:00
aedh carrick
e5f6f2faa4 changed repo path from hard coded to variable 2022-10-29 10:05:03 -05:00
cmdr2
0c7526313f Redownload micromamba if the download failed midway; Start the
script in the script's directory, not where it was run from
2022-10-29 19:48:51 +05:30
aedh carrick
3fddf6848e
Added cell to prefetch models.
Added a config cell for the Colab instance.  Now it can pre-fetch models.  Folder on Google drive can be specified. If models are found there, they will be symlinked instead of downloaded.  Any models found in folder, but not in download list, will be symlinked to models/custom.
Also added comments to code and titles to cells.
Should just be able to enter settings in first cell, then hit 'run all'.
Well... twice.
2022-10-29 07:22:38 -05:00