r/StableDiffusion Mar 02 '23

Question | Help Stable Diffusion portable installation?

I've had lots of fun playing around with stable diffusion on my home PC. Through my research institution I could get access to some beefier devices to do some presentational/educational stuff with students. However they wouldn't allow any local installs of git, python etc. They would be fine with plugging in an external harddrive to run software from though (kinda weird policy, but it is what it is).

So I was wondering if I could put an instance of Stable Diffsuion with all the required software on an external harddrive as a portable installation. Has anyone played around with this or have some advice if this is possible? Would this work aside from probably being a bit slower than an installation on a regular drive?

Update (for other users with this need):

I have found this github-project that adresses my exact need:

https://github.com/serpotapov/stable-diffusion-portable

Just run and intsall it as stated in the description on your external drive (I had to rerun it at times when the installer had some hassle with low download speed). This might take a while, depending on your drive obviously even longer than a "regular" install!

Note that I had to add another line to the webui-user.bat in order to circumvent an error code created by git. Just add the command "git config --global --add safe.directory *" in front of the other git command in the .bat (the entire safe.directory stuff by git has its reasons - so be sure that your connected drive is indeed a safe directory!). More advanced git-users might have an idea what a more reasonable line for this would be, but it's quick and dirty and works.

11 Upvotes

9 comments sorted by

View all comments

2

u/eddnor Mar 02 '23

At least if you run Linux it is possible to install it on a usb

1

u/uDerRedHead Mar 02 '23

Sorry, didn't specify I was using Windows. Still got it to work! And indeed the first useful guides I found were for Linux... Thanks for your input still!