[Stable Diffusion] Prompt Sharing and Learning Thread

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,802
So, nobody knows what's going on?
I pick the exact same seed as you guys, use the same settings, thick the same boxes, but get wildly new creations. Or do you see any mistakes?

View attachment 3003033
I use a different upscaler. You don't have ultrasharp. Not so sure this is the issue though. If you can't find Ultrasharp it's because you need make sure you have these selected in settings/upscaling:
Upscalers visible.png
 

Fuchsschweif

Well-Known Member
Sep 24, 2019
1,143
1,954
HMMMMMMMMM. At 8 it worked. But when I played around with it earlier and tried extrem high and low values it didn't.
So here's my result with CFG at 8.Now that looks good!

1697216919036.png

I assume the following: When you create a picture, the CFG determines how much SD should follow your prompt and how much freedom you give it to deviate from it.

When you however try to recreate from a seed, the CFG determines now how much SD should follow your prompt vs. the seed. What was before SD's "freedom" (= how much not to follow the prompt) is now SD's precision (= how much now to follow the prompt).

Does that make sense?

But as close as this is, let's assume I want to only get an almost exact copy of the OG, with the same angles, proportions, buildings. I just want the details to be finished (because I started to generate bulk picture initially in low res to find one I like). Is that possible? Or do we always have to sacrifice some of the original?
 

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,802
So here's my result with CFG at 8.Now that looks good!

View attachment 3003072

I assume the following: When you create a picture, the CFG determines how much SD should follow your prompt and how much freedom you give it to deviate from it.

When you however try to recreate from a seed, the CFG determines now how much SD should follow your prompt vs. the seed. What was before SD's "freedom" (= how much not to follow the prompt) is now SD's precision (= how much now to follow the prompt).

Does that make sense?

But as close as this is, let's assume I want to only get an almost exact copy of the OG, with the same angles, proportions, buildings. I just want the details to be finished (because I started to generate bulk picture initially in low res to find one I like). Is that possible? Or do we always have to sacrifice some of the original?
You almost always get a little variation in the details such as buildings in the background etc. There are a few options though.
You can use that image as input in controlnet lineart (realistc) or you can work in the img2img tab.
 

me3

Member
Dec 31, 2016
316
708
So here's my result with CFG at 8.Now that looks good!

View attachment 3003072

I assume the following: When you create a picture, the CFG determines how much SD should follow your prompt and how much freedom you give it to deviate from it.

When you however try to recreate from a seed, the CFG determines now how much SD should follow your prompt vs. the seed. What was before SD's "freedom" (= how much not to follow the prompt) is now SD's precision (= how much now to follow the prompt).

Does that make sense?
No, CFG is always how strictly it should follow the prompt. Seed doesn't factor into how strict the prompt is followed.
 

Fuchsschweif

Well-Known Member
Sep 24, 2019
1,143
1,954
No, CFG is always how strictly it should follow the prompt. Seed doesn't factor into how strict the prompt is followed.
Yeah but maybe in this case, following the prompt more strict equals = deviating further away from the seed. Because it tries to add more new stuff based on the prompts instead of gathering from the seed. At least that would explain why CFG 16 doesn't work but 8 does.
 

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,802
That's what I originally did, when you guys said I should instead take the seed and use txt2image because it would work better :LOL:
It were a different image and different scenario. If you want to keep an image but only refine it in other words upscale it do this in img2img tab with the extension "SD Upscale" it works the same as hiresfix but in img2img tab instead. This means that you will keep the image just like you want. You can play a bit with denoising strength to tease out a bit more details also. If you use too much it will instead make the image worse.
 

Fuchsschweif

Well-Known Member
Sep 24, 2019
1,143
1,954
It were a different image and different scenario. If you want to keep an image but only refine it in other words upscale it do this in img2img tab with the extension "SD Upscale" it works the same as hiresfix but in img2img tab instead. This means that you will keep the image just like you want. You can play a bit with denoising strength to tease out a bit more details also. If you use too much it will instead make the image worse.
It was the same scenario IIRC, I just wanted to upscale a low res picture that I liked as close to the original as possible. So in that case image2image is then the way to go..
 

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,802
It was the same scenario IIRC, I just wanted to upscale a low res picture that I liked as close to the original as possible. So in that case image2image is then the way to go..
Ok. Yes if you have already generated an image and you wish to upscale it to get more detail and hiresfix with same seed and prompt doesn't give the same image then the safe bet is to simply upscale the original image with SD Upscale script in img2img tab. This it however not like using the normal upscale in img2img or in extra tab. Those are only enlarging the image, they lack the hires steps. You need to install "Sd Upscale" in extension tab. In available click "load from" and find SD Upscale in the database, press install. When it's done go to "installed" press "apply and restart". Now you can find SD Upscale in the script menu in img2img tab. It works just like hiresfix.
 
  • Like
Reactions: Sepheyer

me3

Member
Dec 31, 2016
316
708
Yeah but maybe in this case, following the prompt more strict equals = deviating further away from the seed. Because it tries to add more new stuff based on the prompts instead of gathering from the seed. At least that would explain why CFG 16 doesn't work but 8 does.
While likely not a correct way to explain it, it might be enough to illustrate.
Seed is the random noise created, prompt is applied to clean that up. No matter how hard to apply the prompt the initial noise is still the same.

With the amount of seemingly small things that can have large effects on the end results there's no need to look for an answer in one of the things that's fairly specific in how it works.
 

Jimwalrus

Well-Known Member
Sep 15, 2021
1,045
3,994
For ref, the seed is just a number. Nothing else. It is used to create a consistent form in the starting static. It simply ensures consistency is possible at all (random static would give random results). It does NOT affect the prompt and the CFG is simply how hard SD tries to adhere to the prompts (often to the detriment of image quality at high levels).

Remember, you can use the same seed number to generate a picture of a corgi taking a dump on a skateboard or one of Selena Gomez with her tits out, entirely depending on prompts, LoRAs, Embeddings, Checkpoints etc.
There will be no 'corgi-ness' to Selena or 'Selena-ness' to the corgi.

Personally, I would usually recommend CFGs between 4 and 11 with the sweet spot usually being 5-8.
There is the option to dynamically adjust the CFG during generation, usually starting high to 'force what you really want', then turn it down to stop some of the worst effects of high CFGs. It gives mixed results and I've pretty much stopped using it.
 
Last edited:

Sharinel

Active Member
Dec 23, 2018
598
2,509
What's the difference between my default one and the one you picked? Aren't the steps just determined by the step slider? Or do you mean that it works better with higher step numbers?
Woops, I said Adaptive, but the correct terminology is Ancestral (I am old and senile)

This is a good explanation -

Basically it comes down to :- Non Ancestral samplers will get to their 'endgame' image after X amount of steps, then any steps after X doesn't add anything to the image, however Ancestral steps never get to that stage, it will always slightly amend the picture every step
 

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,802
Woops, I said Adaptive, but the correct terminology is Ancestral (I am old and senile)

This is a good explanation -

Basically it comes down to :- Non Ancestral samplers will get to their 'endgame' image after X amount of steps, then any steps after X doesn't add anything to the image, however Ancestral steps never get to that stage, it will always slightly amend the picture every step
Did you get a good sense from the article what it means when the image or sampler converge? Or perhaps you know from other sources..
 

Fuchsschweif

Well-Known Member
Sep 24, 2019
1,143
1,954
When it's done go to "installed" press "apply and restart". Now you can find SD Upscale in the script menu in img2img tab. It works just like hiresfix.
Yes I already have that installed, that's how I use it.

It does NOT affect the prompt and the CFG is simply how hard SD tries to adhere to the prompts (often to the detriment of image quality at high levels)
It's just been confusing to me because in MJ using the same seed with the same prompts it was generated with would lead to the exact same picture (iirc).

Anyways, it's now odd because the CFG doesn't change my picture into something completely different anymore, and I don't know why SD now finally "locked" in. At first it was something wildly different at CFG 16 as you all saw earlier, now working my way back up from 5 (running some tests), that doesn't happen anymore.

Here's how the CFG affects the output:


CFG 5 (with 50 high res steps instead of 40 like the other tests)

00066-2549670335.png

CFG 8

00065-2549670335.png

CFG 11

00067-2549670335.png

CFG 14

00068-2549670335.png

CFG 17

00069-2549670335.png

CFG 20
00070-2549670335.png


Except her turning more and more demonic (for whatever reason lol) nothing changes much.
 
Last edited:

Jimwalrus

Well-Known Member
Sep 15, 2021
1,045
3,994
I think the issue was having a variation seed in there somewhere - possibly even after deselecting the option (SD sometimes has these brainfarts).

Also, good work on the CFG differential images - although the effect is usually much more marked at higher levels.
 
  • Like
Reactions: Mr-Fox

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,802
Yes I already have that installed, that's how I use it.



It's just been confusing to me because in MJ using the same seed with the same prompts it was generated with would lead to the exact same picture (irrc).

Anyways, it's now odd because the CFG doesn't change my picture into something completely different anymore, and I don't know why SD now finally "locked" in. At first it was something wildly different at CFG 16 as you all saw earlier, now working my way back up from 5 (running some tests), that doesn't happen anymore.

Here's how the CFG affects the output:


CFG 5 (with 50 high res steps instead of 40 like the other tests)

View attachment 3003209

CFG 8

View attachment 3003210

CFG 11

View attachment 3003211

CFG 14

View attachment 3003200

CFG 17

View attachment 3003201

CFG 20
View attachment 3003204


Except her turning more and more demonic (for whatever reason lol) nothing changes much.
You can see a variation in the cityscape background. Perhaps it would be changing anyways slightly each generated image.
 

Fuchsschweif

Well-Known Member
Sep 24, 2019
1,143
1,954
You can see a variation in the cityscape background. Perhaps it would be changing anyways slightly each generated image.
Yes but higher CFG, according to the tooltip, should lead to less creativity from SD and more strictly following the prompt, so it's interesting to see that SD sticks to the same bg-generation with more creativity allowed and then starts to do more on its own while the CFG goes up. Especially because I didn't specify the background in terms of building placement.

Also, rain is generally missing. Something that was present in the OG:
(probably something I could fix with prompt weights)
00056-2549670335.png
 
Last edited: