SD Chad - Stable Diffusion Aesthetic Scorer #1831
Replies: 12 comments 11 replies
-
Given that the highest rated images still have poorly formed hands, I feel the the most useful part of this approach is to use the low scores as a filter. So ditch anything under a score of 4. Then maybe bucket the remaining into low/high potential buckets or similar. Especially if the image generation can be done at step 5,15 and final (or similar). I'd like to be able to use this with other scripts though. If you make it a script it means not being able to use the other scripts who's output may be what is wanting to have the aesthetic score generated. Can you consider making this a non-script PR? |
Beta Was this translation helpful? Give feedback.
-
Hey, I played with your repo and found it can be sped up significantly by using CLIP-ONNX, https://github.com/Lednik7/CLIP-ONNX. |
Beta Was this translation helpful? Give feedback.
-
the new feature "Skip" could benefit from this score prediction as soon as it get the low score, lets say a checkbox "Auto-Skip using SD Aesthetic Scorer"! |
Beta Was this translation helpful? Give feedback.
-
Great idea, I'll play with the code on that part to see if I can hook it up. I already retrained it and I have a better scoring model (need to publish in the repo), and I am testing how fast in the steps you can correlate that to a good vs bad image down the final step. I tested it on 10,000 gens at 5 steps, and it can score amazing pics by the hundreds w that few steps. But I want to see if it can do it in 1 : ) |
Beta Was this translation helpful? Give feedback.
-
Pardon my ignorance. Should I just git clone this repo into my main stable-diffusion-webui directory and drop your chad_scorer.py file under the script for the main repo? |
Beta Was this translation helpful? Give feedback.
-
I don't understand how to get the windows tags for sorting like it was shown in the extension screenshot. Can somebody help? |
Beta Was this translation helpful? Give feedback.
-
Is there a chance this might turn into an extension to easily be used with the main UI? I'm very interested in using this. |
Beta Was this translation helpful? Give feedback.
-
I used parts of your code to do some amazing stuff with it. Is your work licensed in any way? Please let me know if I can use some of your code for my custom script |
Beta Was this translation helpful? Give feedback.
-
This doesn't let me select the script, I get the following error on load: Error loading script: chad_scorer.py |
Beta Was this translation helpful? Give feedback.
-
Can we get this integrated into the API :] |
Beta Was this translation helpful? Give feedback.
-
It will be nice if it can integrate to image browser |
Beta Was this translation helpful? Give feedback.
-
Does this script still work? I added |
Beta Was this translation helpful? Give feedback.
-
SD Chad - Stable Diffusion Aesthetic Scorer
Have been using SD to create art for the last month, finding a template that works across prompt, seed, settings, and then creating 100s of images from it, selecting the best, deleting the rest.
That flow works great already, have lots of pics that look as good as those trending on ArtStation. Then I thought about automating this using AI. Here is what I have done so far:
https://github.com/krea-ai/open-prompts
https://drive.google.com/file/d/1c4WHxtlzvHYd0UY5WCMJNn2EO-Aiv2A0/view
https://github.com/rom1504/clip-retrieval
https://github.com/LAION-AI/aesthetic-predictor
https://github.com/christophschuhmann/improved-aesthetic-predictor
https://github.com/grexzen/SD-Chad/blob/main/chad_scorer.py
https://github.com/grexzen/SD-Chad/blob/main/chadscorer.pth
Now I am retraining the scoring model again using the top 2,500 images scored from 200K gens (1.5 model + new VAE + style = best gens so far), and handpicking the few images that I would personally published in my art channels. First test was great, the model really seems to understand which images I would pick.
SD Chad Script
https://github.com/grexzen/SD-Chad/blob/main/chad_scorer.py
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts
https://github.com/grexzen/SD-Chad/blob/main/chadscorer.pth
https://github.com/grexzen/SD-Chad/blob/main/create_gens_from_list_of_prompts_and_seeds_and_score_them.py
https://github.com/grexzen/SD-Chad/blob/main/simple_inference.py
https://github.com/grexzen/SD-Chad/blob/main/train_predictor.py
ASV1 vs ASV2
Here is ASV1. Album score =10 https://ibb.co/album/cY7GQW. Album score = 0 https://ibb.co/album/84p0Bk.
Here is ASV2. Album score = 8 (highest) https://ibb.co/album/ypWyhL. Album score = 2 (lowest) https://ibb.co/album/0Rk3Yx.
ASV1 has a nicer distribution of scores, while ASV2 is pretty tight in the middle. Since ASV2 was created by scoring non-gens that might be why is so strict scoring gens from SD. It also seems to prefer realistic images.
ASV2 vs CSV1
ASV2 is great for scoring your images vs other gens + no gens (SD vs real pics) and CSV1 is great for scoring your images vs other gens only (SD vs SD).
Below are the distributions, average scores, and 2 & 3 standard deviations from the mean.
.
Beta Was this translation helpful? Give feedback.
All reactions