Refining with XYZ plot - Stable Diffusion Video Tutorial | LinkedIn Learning, formerly Lynda.com (2024)

From the course: Stable Diffusion: Tips, Tricks, and Techniques

From the course: Stable Diffusion: Tips, Tricks, and Techniques

Start my 1-month free trial

Refining with XYZ plot

- [Instructor] Earlier while doing some batches of renderings with the realistic vision model, I came across this, which I really like. I really like the quality of it. I like the pose, I like the detail of Stonehenge. I even like this chromatic aberration, this weird green stuff that's coming around here that feels very authentic. A weird combination of a cheap lens and a nice quality lens on her face. So I could stop here, but don't forget about the ability to make those XY grids because it's a quick way to find out if maybe somewhere in this same part of the image space there's something else that I would like. Or maybe if I render this data from the inner image space with a different sampling method, I would come up with something else that I like. So let's come down here to X, Y, Z plot, and let's start by saying we want to try a variation of steps. We'll do 20, 30, 40, 50, and 60, and let's try fiddling with the CFG scale, and seeing what happens. We were at 7, let's go 7 1/2. 8, 8/12, 9, 9/12, I don't know that we really need to go up to 10, but we'll give it a try. I have kept the seed the same. These are obviously all working with the same sampler. So at a CFG scale of 7 /12, I can see that increasing steps isn't really making any effective change. Increasing CFG is adding a lot of contrast that I don't like. Look at Stonehenge here versus Stonehenge here. Obviously it's changed geometry, but also the shadows are darker, and those darker shadows are also showing up on her cheekbones. She's got a little cleft in her chin that I hadn't seen as much before. So I definitely feel like with this image going too high on the CFG scale is a mistake. I really feel like for the soft light we've got in this scene or that's implied in this scene by the cloud cover, even going above 7 1/2, even going to 8 is getting shadows that are a little bit too strong. With this particular sampler, increasing steps doesn't seem to be getting us a lot of change in, well, really anything. Her expression's not changing. The background isn't changing. So I'm not finding that there's anything else that I like any more here than what I was already getting. So that's great news. I don't need to mess with those parameters, but I am curious about what another sampler might do. So I'm going to do another plot. I'm going to assume that increasing the CFG scale is always going to increase contrast in a way that I don't like. So we'll graph steps against a sampler. Again, the easy way to fill these in is to just hit this button, which gives us all of them. We're using Euler A, I'm going to get rid of that. Over time, you may find there's some things you are curious about because some samplers you're curious about because you've gotten good results from them before. Things like that. I'm going to take these out. I'm going to keep DDIM. I'm going to take this out. I can't give you any really good reason for why I'm choosing the ones I'm choosing. Any sampler that has A in the name means it's an ancestral sampler. That doesn't mean that it's old and obsolete. That means it takes a particular approach to the way that it does things. I do want to see this one. I'm going to try and get it down to maybe five samplers. We'll just take those out. One, two, three, four, five, six, that's fine. And we'll render this. Here we are, and now we're seeing some pretty different renderings depending on sampler. Ooh, here we're even getting some bare shoulder. Totally different poses in the DDIM sampler. So the first thing we can do is say, does the step count matter for any particular sampler? It does not for the Heun sampler, it does for some of these others. Earlier I mentioned the idea of convergence, and you can see it happening here with DPM a Karras. It starts out here at 20 steps and then we get some change and then it settles down by the time it gets to 50. In fact, all of these are showing convergence at around 50 steps. My goal here is not to look at this with the idea of deciding, "Well, what's the sampler I want to use all the time or from now on", my goal is just to say, "Is there another image that can be produced from where I'm at now that I like more than the one that I had, or in addition to the one that I had?" And I would say that I don't like any of these as much as what I had. Maybe this one, it's interesting that they've all decided to bring her hands up into play except for this one. These are definitely, this is a nice image. Actually, that's a nice smile. These are the ones that I might want to go look at close up and see if there's something else I like. So that's nice. I started with one image, now I have three related candidates that I maybe like as much or more. So this plot script is not just useful for doing some experiments to try to learn how samplers work, which is what we were using it for before. It can be the final polishing step that you take before you go on to up sizing your image and creating a final output. It's a chance to very easily see some variations that might lead in a place that you like. So don't forget about the plot script. After you've written a prompt, done your image to image, your control net, everything else that's gotten you to a final image. Once you've got that final image, it's time to start working on some variations before you head on to in painting, up scaling, and the other parts of your workflow that will alter that image.

Contents

    • What is Stable Diffusion? 46s
    • What can you do with Stable Diffusion? 3m 33s
    • What's different about Stable Diffusion? 5m 56s
    • How can you access Stable Diffusion? 2m 39s
    • Installing Stable Diffusion locally 6m 47s
    • Using Stable Diffusion 4m 13s
    • What does a prompt do? 3m 37s
    • Stable Diffusion seeds 2m 1s
    • Stable Diffusion batches and pixel counts 3m 42s
    • Prompt basics 11m 6s
    • Questions to answer when writing prompts 5m 36s
    • PNG information and saving 8m 32s
    • Using CFG scale 6m 1s
    • Prompt weighting 5m 23s
    • Writing prompts for series 2 models 6m 48s
    • Prompt libraries and styles 4m 22s
    • Interrogating an image 2m 47s
    • Artist names and rendering styles 3m 57s
    • Sampling and steps 7m 41s
    • Automatic iterating 8m 42s
    • Changing SD models 9m 28s
    • Using LoRA models 8m 48s
    • Using embeddings 4m 34s
    • Upscaling SD images 9m 26s
    • Settings and extensions 9m 21s
    • img2img basics 8m 5s
    • img2img options on hosted sites 2m 59s
    • Using a sketch in img2img 6m 8s
    • Using a photobash with img2img 6m 1s
    • Changing aspect ratios with img2img 6m 55s
    • Removing elements with inpainting 7m 3s
    • Adding objects with inpainting 6m 3s
    • Outpainting 7m 31s
    • Using outpainting to resize an image 6m 40s
    • Improving faces created by SD 7m 45s
    • Outpainting with openOutpaint 6m 5s
    • Instruct pix2pix 9m 43s
    • Free handy resources 6m 2s
    • Introduction to ControlNet 14m 22s
    • Installing ControlNet 3m 11s
    • OpenPose in ControlNet 14m 3s
    • Limitations using OpenPose 4m 13s
    • Using img2img and ControlNet 4m 28s
    • Choosing a ControlNet model 6m 20s
    • Image size and ControlNet 2m 40s
    • Other features in ControlNet 3m 31s
    • OpenPose editors 10m 47s
    • Using models to influence image style 7m 17s
    • Inpainting and upscaling 5m 27s
    • Refining with XYZ plot 5m 54s
    • Complete a Stable Diffusion workflow 18m 25s
    • Creating a custom model 10m 18s
    • Creating models with DreamBooth 13m 47s
    • Merging models 6m 36s
    • Training a model using an object 7m 7s
    • What's next 2m 16s
Refining with XYZ plot - Stable Diffusion Video Tutorial | LinkedIn Learning, formerly Lynda.com (2024)
Top Articles
Latest Posts
Article information

Author: Twana Towne Ret

Last Updated:

Views: 6215

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Twana Towne Ret

Birthday: 1994-03-19

Address: Apt. 990 97439 Corwin Motorway, Port Eliseoburgh, NM 99144-2618

Phone: +5958753152963

Job: National Specialist

Hobby: Kayaking, Photography, Skydiving, Embroidery, Leather crafting, Orienteering, Cooking

Introduction: My name is Twana Towne Ret, I am a famous, talented, joyous, perfect, powerful, inquisitive, lovely person who loves writing and wants to share my knowledge and understanding with you.