Stable Diffusion Forge UI: Under the Hood Exploration - Tips and Trick #stablediffusion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in today's video I want to take a look under the hood of stable diffusion Forge UI we'll explore where you can find the models and settings where to put them and provide more information to address some questions I've received lately let's start at the beginning with your Forge folder here you'll find a few bat files a bat file short for batch file is a simple type of script or program used in Windows computers it consists of a series of commands that are executed sequentially when the file is run if you want to update your Forge you simply run the update. bat file um if there are updates available you'll see a list indicating what was updated in this case it says it's up to date press any key to exit if you rightclick on it you can open it with notepad or edit it here you can see a list of commands this line calls another batch file named environment dobat this part handles errors and this part uses the git command to pull updates from a repository located in the web UI directory so if you were to do it manually without the bat file you would navigate to the web UI folder in the address bar you would type CMD and press enter to open the command window in this exact folder here you would type get pull and press enter and you would get the same result as when we ran the update dobat now let's check what the run. bat file does I'll right click on it and open it with notepad or notepad++ here you can see that it calls the environment but also calls the directory web UI another file named web uiuser dobat so you can go to uh that folder and check what is inside that bat file here you can see at the end that it calls another bat file named webui dobat which is actually the bat file that uh starts the forge you can see a lot of lines of code but it starts after running some arguments and settings you can see where it says command line args here I only have one setting that make the theme dark but if you were to add more arguments here you would add them if we go to the stable diffusion Forge UI GitHub page and scroll down to where it says Forge backend you can find more information about arguments you can see that all the arguments we used to use on automatic 1111 now are removed and Forge decides what is best for it but you still have some arguments that you can use if you want So if you think one of them will help you get faster Generations you can test it out you can copy that argument I'll have that double line in front and paste it into your bat file and save it if it doesn't help with your speed you can remove it from the dot bat and you are back to how it was but you still have some arguments that you can use if you want So if you think one of them will help you get faster Generations you can test it out you can copy that argument I'll have that double line in front and paste it into your bat file and save it if it doesn't help with your speed you can remove it from the dot bat and you are back to how it was let's talk about models a stable diffusion checkpoint is essentially a saved state of a machine learning model that has been trained to generate images based on textual descriptions as you can see here in this list um I have only one model if you are also using automatic 1111 and have all the models there you can access those models inside Forge without copying them saving some space on your drive edit the web uiuser dobat file here you have some commented lines of code with remw in front if you want to activate the paths for the automatic you simply remove that word from all the lines then where it says to set home you put your automatic web UI path now navigate to your automatic 1111 web UI folder copy that path and paste it into the bat file now here's the catch if you look at other paths you can see that it uses forward slashes instead of backs slashes so to make this work you replace backs slashes with forward slashes go to file and save that file now if we go back to the run.bat file we can start the forge again with the new settings and it should take all the models you have on automatic as you can see now I have all the models here and it also took the Laura folder if you check you can see the path so it will take them only from that path since this is a forge tutorial I will comment out the lines for automatic again so we can work only with Forge you might ask okay but from where can I get more models a popular website is called civit a.com click on the models tab to see all the models available then you can sort by highest rated or most downloaded by default the filter is set to all time but I prefer to filter by time period such as for a month or a week then for the model type choose checkpoint and for the base model the most popular our version 1.5 and sdxl version one I will select sdxl to check a model click on the cover for example the one I'm using now is Juggernaut XL I am using Version 9 and here you can see an example of what it can do click on the I to see more info about the prompt used and settings to get this image then click on the download model button and choose it from the list it's quite big so it will take some time to download place the model in your web UI folder then in the models directory and then in the stable diffusion folder as you can see I already have it downloaded in this folder for checkpoints make sure the extension is safe tenser the ckpt extension might not be as safe once it is completely downloaded you can hit the refresh button and find it in the list you can also download Laura models if we go back to the models Tab and instead of filtering by checkpoints we filter by Laura it's important to download Laura models for your version of checkpoints if you are using sdxl use sdxl Laura if you are logged in you will see many of the cover um that are blurred you probably guessed why if you click on the I icon you can deactivate that um so you can see actual images let's test a Laura I will click on this glow neon Laura um you can see from the name that it is for sdxl model since it has sdxl and also you can see it here click on the download button and put it in web UI models and this time in the Laura folder once it is downloaded you can find it on the Laura tab here hit refresh if the forge was open I will test the model quickly using a prompt like a cinematic photo of a cat in the night after I hit generate in about four or five seconds I get a cat like this I will use the same seed by using this button then on the Laura tab I will click on the Laura I just downloaded that will add it at the end of The Prompt many luras come with one or more trigger words so if you look at the page P from where you downloaded it you can find that info there I will copy this word and put it in the prompt I will generate again to see how Laura influences the generation I will add another word to see how that changes the image sometimes the Laura can be too strong and can cause glitches right now the Lura power is set to one you can reduce that to 0.75 or 0.5 or any other values if it's than one it reduces the power if it's 1.2 or 1.5 and so on it will increase the power sometimes reducing the CFG scale can improve the quality of Laura I will use only one trigger word a random seed but the Laura is too strong so I will reduce it to 0.7 and I got a quite nice cat image let's talk a little about UPS scalers if you go to highers fix you can see in this list that Forge already comes with a lot of UPS scalers you can also find UPS scalers in the extras tab so if you found a better upscaler online you can download it and put it into the web Wii folder then into the models folder if you don't have a folder for it what I did was to create a folder with this exact name ESR Gan that seems to be recognized by Forge then inside I put the upscaler model like you see here this sex model that I found online I think on civit AI let's cover one more type of models the control net ones if you go to the control net tab by default you don't have any models here you can find models but keep in mind you need models compatible with your stable diffusion checkpoint for sdxl models you can download them from hugging face there are a lot of them you can play around with you have to test to see what works best for you you can also find them on civit AI here's a link to all kinds of control net models uh for version 1.5 you can get it uh from this hugging face page you can see it has 15 in the name and you need both the pth and yl files um alternatively you can get it from civit AI you put all these models in the same folder um so go to web UI models and then control net now if you refresh the list or restart Forge it should appear there let's talk about Styles if you click on edit Styles here you can add a style name let's create a new style called impasto painting for the prompt describe how you want the prompt to be but without including a subject or other details focusing on style then for the negative prompt add words that you don't want to see in your Generations like photographic you know signature low quality and other words you think will help save and close the style you can find the newly created style in this list and you can quickly add or remove it now let me show you how it works I will go with a fixed seed to be able to show you the difference before and after I will test with a simple prompt like a cat depending on your model you get a random cat now if I activate the Style by selecting it I get a cat in that style what the style does is add to the prompt the text you added in the art style like in this case after cat we got impasto painting and also the negative prompt so it's a good way to save time if you want to make a backup of all the Styles you created or you want to share them with someone or you found some Styles online and you don't know where to put them here is where the file can be found go to the web UI folder and look for the Styles CSV file CSV not CSS you can rightclick and edit it with notepad or open it with Excel you can see that each art style is on a separate line with the artart style first then a comma then the positive prompt in quotes um again a comma and the negative prompt in quotes you can select multiple Styles at once and it will combine them in the order you select them click on the X icon to remove them if you want to permanently delete a style you go to edit Styles select it from the list and press the delete button then confirm deletion now it's what's gone from the styles list go to the web UI folder and look for the UI config Json file make a copy of it for backup so we can play around without messing up our stable diffusion interface now you can open it with notepad and here you have a lot of settings you find in the interface from width and height to what is visible and not to limits that are set in place and that you can increase right after you start forge modify the things you need in the interface like for example if you all the time use certain width or height or certain sampling steps or any settings that you find yourself putting them again and again um an easy solution is to go to settings scroll down to find defaults then go up and click on view changes here you can see the old value and the new value if you are happy with changes click on apply settings and reload UI as you can see it kept the same width and height and sampling steps I modified if you look now again in the UI config file you can find all those changes there so I can search for that width number can also change it here I can put 12200 here and save it then I will restart Forge by closing the command line and running it again and as you can see we have the new value here if you mess up something you can always go back and delete the original and rename the copy you made to have it how it was before the edit restart again and it should be all reverted I like shortcuts and doing things fast so for Forge I like to create a shortcut of the run.bat file by right clicking on it and selecting create shortcut now you can cut or copy the shortcut to a place where you can easily access it like your desktop let's make it bigger so we can see it and um now I will press f2 and rename it to forge right click on it go to properties and click on change icon click okay then select an icon from this list of icons for example I will choose this star click apply and okay and now you can easily run Forge let's go to the extensions tab here you can check for updates and it will show you on the right if there are any updates available I have these three extensions installed and the rest come with Forge if you click on available and load from you can see a lot of extensions available that you can install and test you have different options for order and you can also search for an extension here in the search bar Let's test a random extension to see how we can approach this this this generate button extension sounds interesting click install and wait for it to be installed then go to the installed Tab and you can find it in the list here you can check for updates if you haven't done so for a while and then press the apply and restart UI button what this extension does is add an extra generate button at the bottom so you don't have to keep scrolling up for the button I will test it with the cat quickly and it seems to be working but if you have a problem with an extension or um if it's in conflict with another extension and your Forge might not start or something you can go to the web UI folder then extensions and simply find that extension folder and delete it uh it's that simple now when you restart Forge and check again you will see that the extension is gone you can also click on the link provided with an extension to learn more about it from their GitHub page you should do that before you install an extension anyway to click on the link and check what information they offer to see if it's good for you and to find more info on how to use it when you generate something by default it goes into a certain folder if it's done with text to image or if it's with image to image in another folder and so on now if you look under the image you have a folder icon that will open the output folder but I like to export all in the same folder because it's easier for me so do what works best for you I am going to settings and on path for settings I put all the paths to be the same folder I made a shortcut on the desktop to that folder so no matter what I generate it goes to the same folder for saving image and grid I have this pattern and settings for the file name and down for temporary file I put the same folder I disabled saving to a subdirectory because of the type of work I do I just generate what I need and delete the next day and start over you need to apply the settings and reload UI I want to thank you all for your support and invite you to hit that subscribe button 88% of people who watch my videos haven't subscribed yet you can also check out my other channel wise mind Echo where I use the AI generated images to create videos and stories if you have any questions you can post them in um my pixaroma community Facebook group I check it daily and I try to help in any way I can we also have daily AI challenges there that is all for today thank you and have a great [Music] day
Info
Channel: pixaroma
Views: 3,340
Rating: undefined out of 5
Keywords: Stable Diffusion Forge UI, Tips and Trick, stable diffusion forge tutorial, stable diffusion tutorial, stable diffusion ai, webui forge, forge ui, stable diffusion forge ui, stable diffusion web ui forge, stable diffusion tips and tricks, forge ui exploration, forge ui paths, forge ui models, forge ui stable diffusion, forge ui sdxl, civitai models, forge ui settings, stable diffusion forge ui settings, forge ui tips, pixaroma, controlnet models, webui forge controlnet, forge
Id: q5MgWzZdq9s
Channel Id: undefined
Length: 17min 45sec (1065 seconds)
Published: Fri Mar 15 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.