ok, it might take longer than ten minutes. but i needed a snappy title and it really shouldnt take long at all
intro
im writing this guide because i know a few people on this site who want to gen locally now that R18 is paywalled, but dont know how. its kind of intimidating to learn because honestly a lot of tutorials are either 20 minute youtube videos with a lot of crap thrown in that you dont need. or long articles with lots of jargon. so im writing this for the everyman i guess... my computer is crap, i knew nothing about ai before 4 months ago, and i had no idea how to locally gen before civitai did the blue buzz crackdown
what i use (and what you will be downloading)
i use SwarmUI, which is an open source gui for ComfyUI. ComfyUI is the most comprehensive and detailed local generator afaik, but its also really complicated. SwarmUI adds a simple frontend for it and includes it all in one simple download. so its kind of the best of both worlds in my eyes
if you missed the link above, this is all you need:
installing swarmui
on the official site, scroll down until you see "run locally on your own machine". it should take you to a github page, it's here if you cant find it.
the github page should tell you what you need to do to set up the install. the tl;dr is that if you have windows 10, you might need to install some extra dependencies but if you have windows 11 itll do it automatically. linux has a different setup that im not entirely sure about. after that make a directory that you want to have it run from such as C:/SwarmUI/, and put the install-windows.bat file there.
run it and let it do its thing. it might take a minute or two, so only quit out if it errors or crashes. you should automatically have your browser open up a local webui installer. believe it or not, you're already halfway there to having swarmui installed. if it crashes or hangs for more than a couple minutes, close the command line window and try again! dont close the command line window once the website opens

the installer should be easy to follow, but theres some things we're going to do differently to make it even better.
pimping out the install
once you hit agree, it'll ask you if you want to do express or custom. im going to suggest custom, since its not much more work and adds some cool stuff you can do with it. here are the steps in order of what i recommend choosing:
Agree
Customize Settings
itll ask you if you want a desktop shortcut, if you choose no you can always make one later
choose your theme, i like dark dreams
Just Yourself, With LAN Access. if youre doing this at work or some huge lan network that youre worried about privacy on, you can either set up security for it later or choose "Just Yourself On This PC". what this does is let you access SwarmUI from your phone or laptop if you want to do it in bed or something. for totally normal reasons im sure
ComfyUI (Local)
Disable Stable Diffusion XL 1.0 (Base). this cuts out 6.5gb of data being downloaded, since you probably have base models from civitai you prefer. we'll grab those at the end
Install Now!
let it run to completion. it might take a while. youre safe once you see [Installer] Installed!
congratulations, you have successfully installed SwarmUI. you now technically have local generation on your computer!!! if it doesn't automatically launch SwarmUI, you can close the window then run launch-windows.bat. if you didnt make a shortcut this is also how you run SwarmUI every time
what next?
im not going to go into how to run SwarmUI in this article, i might make another article if people are interested. but there are some things that we need to do before we can generate some images. like download some models!
downloading models
downloading models couldnt be easier since you can just link to a civitai page and have it do its magic. but first we need to link our api key or else some models will refuse to download. you can find this in User -> User Info, its pretty straightforward and tells you what you need to do
once you do that, go to Utilities -> Model Downloader. paste in the link of a base model you like, whether it be illustrous, pony, noobai, whatever! itll automatically convert it and download lots of useful metadata

you can do this for almost any type of model, and itll even detect what type it is. in the generate section of the webpage, you can view base models under "Models", and other types like styles and stuff go under "loras". the only model type ive run into issues with is upscalers, you have to put those manually in SwarmUI\dlbackend\comfy\ComfyUI\models\upscale_models. you then have to run the upscaler setting on the left, but thats outside the scope of this tutorial
getting lan working
i liked civitai on mobile a lot, unfortunately SwarmUI on mobile isnt nearly as good. but its still perfectly usable, its just got bad ui unless youre on a tablet or one of those fancy folding phones
there is a pretty good guide on how to get both local lan (for when youre at home) and networking (for when youre genning dirty 18+ images on a bus?) here, but all you have to do to get the lan network set up is go to Server -> Server Configuration, and set Host to 0.0.0.0. restart SwarmUI, and it should tell you on Server -> Server Info what the address to put into your web browser is (you can bookmark this it shouldnt change). swarmui can now stay running on your main pc as long as you keep the cmd window open!

thats all i really have to say, youve now got local genning running on your pc! this is assuming i didnt forget something like a dummy
other things
i will also briefly mention that there are additional extensions such as "sageattention" to make generation even faster if you have newer gpus. originally i spent like a week figuring out how to get swarmui working since its pretty complicated if you go this route and feels like trying to get a skyrim modlist working or something lol... but its only if you have a high end 30X0-40X0 series or something like that. my gpu is an old 1070 and my gen times are roughly around 2-5 minutes per image, depending on what post processing i have and the amount of steps i include. i personally am totally fine with this as sometimes civitai took even longer than this thanks to the queue. would be nice to get a fancy gpu but i cant justify the amount id have to spend just on making hot images on my computer. im not going to get into this stuff and just do the basic download since its dead simple without them, but they are there if you want them
if you're curious about google colab, its another option if your pc is truly crap or you're running a laptop. ive tried it and its a bit weird. the main thing is you have very little space on your google drive. wouldnt recommend it unless you pay for lots of storage
let me know if you found this helpful, i could post more on how to run swarmui and stuff. im also figuring out how to use it honestly. im not sure if these super simple down to earth type of articles are helpful or not
