CFG Secrets: "Negative Prompt" is NOT REAL

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up it's me all right so we're going to talk about something uh CFG and the quote unquote negative prompt which is not a real thing by the way um so we have our prompt set up going to raise us to seven one girl short black hair Office business suit you hit generate and it does the thing you expect it generates the thing right cool perfect but lower CFG to zero what do you think's going to happen just just guess leave a leave a comment about what you think's going to happen blue-haired Beach rainbow girl how about this maybe it's a fluke maybe it's just a coincidence redhaired Beach rainbow girl you think you think two you think two coincidences in a row is possible how about three nope statistically improbable all right so CFG and the quote unquote negative prompt and the reason why it's not actually real and why we need to stop talking about this is because CFG requires a an unconditional text embedding that contains empty text all right that's how CFG works is it compares the score between your conditioning and the unconditional conditioning and says hey how far away should I go from that like what what should the difference in that score be do I want to prompt adherence or do I want to do the the stuff that I generated with the uh like the null tokens during the the training process right but the thing is the quote unquote negative prompt which is not really a thing is just a repurpose of this empty text so that we could shove text into it and the reason why that's important to know is because this was never meant to be used like this it's the whole concept of positive and negative prompt are found nowhere on the hugging face pages that talk about stable diffusion um and if you read the paper on classifier free guidance it does not mention anything about putting text into that field and using it in this in this manner uh so the reason why I actually bring this up is let me copy my embeddings really quick don't look at my positive prompt uh the reason why I bring this up is because so one this is not doing what you think it does the like CFG negative prompt this does not do what you think it does and two there is actually a lot of information inside these things that you you kind of do want for your image generation process so this all right so CFG zero so it's going to generate based on this this quote this conditioning string right here so and you see like you could like this is a bad quality image like quote unquote you don't you might look at it and say like oh this is ugly I don't want my generations to look like this like kind of except not really because there's a lot of things in here that you do want like colors there's shading there are like there's like shadows and lines and stuff right so if you have stuff in here and then you raise CFG very high and you're basically saying hey hey AI remember all those colors and those lines and that shading you had I don't want any of that and then you start getting this like these this strange pixelated like what is this it's obviously a girl like right but there's like there's there's like dude this is like just art this is composed of art this is like a mosaic like I like like what's like it's like a kaleidoscope almost it's like a like a like stained glass art that has been melted over the years because glass melts if you didn't know anyway uh so yeah this was never meant to have text in it so if you delete that you'll probably get a bad image cuz CFG is super high but it's going to be slightly less bad just very slightly um so yeah that's pretty much all I have to say on the subject um negative prompt is not a thing um the way CFG works is by during the step process it gets a score between this and then what should be empty conditioning and then it kind of like goes away from that that score difference based on your CFG value so if you start having like weird artifacts or if you're having issues with CFG being too high or more importantly if you are a type of person who does resampling and you notice that you have problems with certain D noise values it actually might be in your best interest to start leaving this blank at later stages down the pipeline because it was never meant to have tax in the first place okay thank you goodbye
Info
Channel: poisenbery
Views: 3,212
Rating: undefined out of 5
Keywords: cfg, ai, stablediffusion, negative prompt, classifier free guidance, comfyui, sd, stable diffusion, prompt engineering
Id: B30DGzKrhnE
Channel Id: undefined
Length: 4min 45sec (285 seconds)
Published: Sat Dec 02 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.