-
Notifications
You must be signed in to change notification settings - Fork 2.7k
1-click installer and updater. Uses micromamba to install git and conda into a contained environment (if necessary) before running the normal installation script #1253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ontained environment (if necessary) before running the normal installation script
…a for the actual installation; Update conda during the update script
…; activate the env before updating
Merge upstream
…atically on the first run; Activate the base environment before running the rest of the conda commands; Don't download conda/git again if it's already been installed by the installer
…ontained environment (if necessary) before running the normal installation script
|
We really need to stress to users that they should put the install script in a new folder/dir before they launch it - currently it dumps everything in the script's pwd, which makes a serious mess if one runs it in e.g. $HOME |
Yes - And potentially add a confirm step to the install process to verify they've done it |
@Vargol tagging you b/c you were running different requirements (requirements-mac-MPS-CPU) vs. environment-mac.yml. Which by the way, what is the cut-off point / what determines who installs with requirements-mac-MPS-CPU vs. environment-mac.yml? |
|
No cut off point, just a series of poor experiences with conda, I don't want that thing any where my mac. |
|
As soon as this is fully tested and merged, I intend to replace conda with pip and venv. mambathingy can stay as an easy way to install git. |
lstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd really like to get this into 2.1. It's a big improvement and just needs documentation.
Please add a pointer to the installer scripts in the README file under the main Installation section, and add a walkthrough in docs/installation/ONE-CLICK-INSTALL.md (or whatever you'd like to name the file). I hope to get the PR for automatic model loading merged in today, so that will be taken care of.
Finally, as others have noted, there needs to be a message printed at the end that tells users what to do to get the CLI and/or WebGUIs running. (Apologies if you've already done this)
|
Seems it works But as a user, I’ve been stuck with this Are we going to do a fully automatic installation or to leave it like that? |
|
Thanks everyone, I plan on working on the PR comments later today. |
|
M1, macos Ventura 13.1. Webserver error Also, it installs right in the /user/ folder. Better to create a separate one for SD. |
|
I've just rewritten the At that point, there's just a little documentation and videography, plus the debugging. I'll make a release branch when the preload script is tested and merged. |
… in the script's directory, not where it was run from
|
Thanks, I've made the changes based on the PR comments, and I think this PR is ready (from my end) to be considered for merging. After merging, 4 things need to happen:
PR feedback and changes:
Otherwise, you can always just press the "Squash and Merge" in this PR, using the arrow next to the "Merge" button: https://stackoverflow.com/a/36377439
I've added a script |
lstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just run through the process and aside from pip taking forever it was smooth and painless. I particularly like the last step where it offers to launch invoke. The only issue there was that the models files weren't downloaded due to using the version of preload on main. I'm going to change the bat file's checkout branch to get the full experience.
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:
Suggested new process (for Windows, Linux and optionally Mac):
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:
Allow micromambabutton)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 (~1k installs/day) for over 2 months. None of the support issues have been due to this bootstrapping process, but rather due to the usual pip failures, VPN issues, bad system config etc.
How it works:
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.
Next, it'll checkout the project's git repo, if necessary.
Next, it'll run the usual conda create commands (from the docs) to download the dependencies.
Finally, it'll then run the
preload_models.pyscript to download the weights (except the SD 1.4 model).After installation, users can run the new
invoke.batorinvoke.shscripts to enter a pre-activated conda environment. They can also do it the old way (of manually activating conda). It'll use either the git/python/conda that was installed through this installer, or the user's existing git/python/conda installation.The user will be presented with an option to start the command-line, or the web UI.
Finally, the user can run the new
update.batorupdate.shscript to update the git repo and the conda environment.Next steps (if you wish to adopt this)
If you're willing, then the next steps are:
installerfolderIf 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! :)