• Suddenly unable to log into your ZooVille account? This might be the reason why: CLICK HERE!

Guide: Generating AI Images Yourself

theduke

Lurker
Previously I posted this as a reply to another thread, but thought maybe it deserved its own in case it will help anyone out. It seems like a lot of steps, but it's actually not that bad. The part that will take the longest is getting it set up intially, but after that it's pretty quick to launch and configure to start generating images.

The two main items that will be installed are Pinokio and Fooocus. Pinokio is a kind of playground for different user interfaces. Inside of Pinokio we will install the Fooocus user interface that we will use to generate images. This guide will take you through that installation and configuration as well as give you some examples of prompts. There is also a resources section at the bottom with some other videos, articles, and links to models.

This guide will cover two models:
1. Pony Diffusion V6 XL - this model will generate images with a cartoon/anime styling
2. Pony Realism - this model will generate images with a realistic styling

You can download one or both of the models (steps 4 and 5 of the install steps below) to use when generating images.

It has been a little while since I have fully gone through this installation myself and I'm writing this from memory, so if you run into any issues let me know and I can help out and update the guide if I am able to.

NOTE:
This guide is for Windows specifically, not sure about any of this for MacOS.

Here is how to install Pinokio, Fooocus, and the models:
1. Download and install Pinokio -- I installed it to c:\pinokio but put it wherever you want
2. Open Pinokio and click on the "Visit Discover Page" button.
3. Search for Fooocus and install it. It may take a while and will install a number of things including Visual Studio. It should handle all of it, so just be patient.
4. Download the Pony Diffusion V6 XL and/or Pony Realism model(s) from CivitAI. When you go to the page, next to the blue "Create" button there is a download button, click on that and it will download the model file. They are fairly large, usually 6-10 GB.
5. Move the files to the checkpoints folder in Pinokio. For me this is in C:\pinokio\drive\drives\peers\<###############>\checkpoints. The <####...> part I think is generated so yours may be different than mine so leaving it out. Paste into this folder the files that you downloaded.

Now to get up and running, configed, and generating images:
1. Open Pinokio, click on Fooocus, you may also need to click on Start to start Fooocus.
2. Once Fooocus is running, check the Advanced box. This will bring up tabs on the right-hand side.
3. Click the Settings tab, choose pony_v6 for the Preset.
4. For Performance choose Speed or Quality. I interestingly was having better results with Speed, but give them both a try and see what works for you.
5. Expand Aspect Ratios and choose either 768x1280 (for portrait) or 1280x768 (for landscape). You can choose other sizes, but the model works best with these.
6. Change Image Number to 3.
7. You can leave Output Format as png, but change it if you want.
8. In the Negative Prompt put score_5_up, score_4_up, score_3_up, score_2_up, score_1_up
9. Click the Models tab, for Base Model (SDXL only) choose either ponyDiffusionV6XL... or ponyRealism... depending on which you downloaded or want to use at the time.
10. Leave Random checked.
11. In the prompt box (the box next to the Generate button) put score_9, score_8_up, score_7_up, score_6_up BREAK.
12. Now after BREAK put a space and then start putting whatever you want to generate. You could do something like forest, brunette, nude, woman, medium breasts or 2girls, forest, brunette, blond, nude, woman -- the full prompt should look something like this: score_9, score_8_up, score_7_up, score_6_up BREAK forest, brunette, nude, woman, medium breasts
13. Click Generate and it will generate 3 images for you (or however many you choose for Image Number under Settings.
14. You can save the images by clicking on them then in the top right there will be a download button (arrow pointing down).

There's a lot more you can do with it as well. The Enhance checkbox brings up a whole other host of settings for instance. One thing that can be helpful there is improving face, hands, etc. Let's say the face needs some work you can do the following:

1. Check the Enhance box.
2. Choose the #1, #2, or #3 tab depending on which of the 3 images you want to enhance (can be all 3).
3. Check the Enable box.
4. Click on the face button (will put face in the Detection prompt box, you can use others as well.
5. Put something like highly detailed face in the Enhancement positive prompt box.
6. Put something like ugly in the Enhancement negative prompt box.
7. Expand Inpaint
8. Choose Improve Detail (face, hands, eyes, etc.) from the Method dropdown.
9. Change the Inpaint Denoising Strength to 0.2 (don't have to use the slider, can just change what's in the box). You can play with this setting to get different results.
10. Once you've set up the enhancements for the images that you want it is VERY IMPORTANT to UNCHECK Random under the Settings tab on the right. This will keep the seed the same and make sure you're generating the same images again which then will be enhanced.
11. Click the Generate button again, it will re-generate the images and then run the enhancements. If you like one or more, save them. If not, generate some new images.
12. To generate new images make sure to RECHECK Random under the Settings tab on the right. This will make sure you get some new images for your prompt. You will also want to uncheck Enable under each of the #1, #2, and #3. That way the enhancements don't run until you find some images you want to enhance.

You can also use the Input Image checkbox, choose Image Prompt and then drag in or click to select an image file to prompt it with. This can help it get a better idea of what you're wanting to generate. Again, not 100% but can be helpful. In some of the videos below it talks about Inpaint/Outpaint and Variations as well.

Here are some other resources:
- Other CivitAI "pony" models
- Pony Realism Compendium
- YouTube: A Beginner's Guide to Fooocus
- YouTube: Secrets of the Variation Feature in Fooocus!
- Danbooru tag groups -- the models were generated with these in mind if I'm not mistaken, and you can use them to get more refined results.
- Adding (( )) around tags will tell the model that it's important. It's not 100% successful, but it can be very helpful. For example: score_9, score_8_up, score_7_up, score_6_up BREAK forest, brunette, nude, woman, ((long hair))
- CivitAI - you can find many other models here, just use steps 4 and 5 from the "install" section if you download another model (it needs to be an SDXL model, should say something about SDXL on the page). There are also LoRAs to download, but I'm not going to explain them here. You can search that up if you want -- the ones I've used in the past added dark themes (like night time, not murder haha) as the images this will generate will pretty much be day time.

Reminder: Checking and unchecking the Random checkbox is very important along the way to determine if you want to regenerate the same images or generate new ones. You can also copy the seed number value and the prompt if you ever want to generate those images again (will need the other settings as well, but those are the main things).

Hope this helps people. Have fun generating images!
 
kinda odd choice to go with the hassle of locally hosting as "try yourself guide" when there's plenty of free-ish (will let you play around to some degree without paying) online services to dip your toes in the whole thing.

slightly odder choice to go with XL models (and fucking pony which needs specific prompting, which you never even mentioned is pony-specific. you do know the "score" bullshit is pony only?). the kind of models which either won't work on not-high-end gpus or will take forever to generate.

also, i'm like 90% sure most pony-based merges (base pdv6 the most) work "best" on square resolutions... 1024x1024, 2048x2048 and so on.
 
Sure, I could have worded the title better. I was trying to write it up for anyone that specifically wanted the privacy of doing it themselves. I don't think it warrants level of hostility you have, though. Maybe I'm just reading too much into the way you've written that reply, I could be off-base. I would change the title it if I could.

While the score prompts do help for the Pony models you can leave them off and it works ok, it's not that big of a deal. It will definitely work better with them which is why I added them into the guide. If someone does have an older GPU, they may want to make the generation time count. A 1060 may take a few minutes to generate each image vs maybe 30 seconds for a 4070. It's not that hard to save that string of text to put into the positive and negative prompts when you start generating and just leave it alone while you change all of the other prompts.

The reason I was suggesting using the Pony models also, is they were originally trained for generating horses, My Little Pony, and adapted from there so I figured they would have better learning for this task but maybe not ?‍♂️. If you have some thoughts there, I'm all ears.

As for the resolutions, Pony Realism specifically mentions using 768x1280 or 1280x768, but it also works just fine on 1:1 resolutions like 1024x1024. Again, it's a suggestion and you really have to just look at each image for different mistakes it may make. Pony Diffusion v6 XL doesn't specifically mention any set suggested resolution on the model's page and I've used it with square, portrait, and landscape resolutions with absolutely no issues.

I just got done using Pony Realism to generate a bunch of images for a D&D campaign for ghouls, bandits, dwarves, shop keepers, city guards, etc. and it suggests using 768x1280 or 1280x768, but I wanted 1024x1024 for what we were doing, so I used 1024x1024 and it worked just fine for generating over 100 images.

And if you want larger images you can use the Enhance > Upscale or Variation > Upscale (2x) if you would like larger images. However, I have found it can sometimes lead to it doing some strange things with the body of the subjects in the image. Not always, but definitely need to look at the images critically after generation if using this. Also, it will make generation take even longer, so keep that in mind.
 
Back
Top