GitHub - 1ort/txt2palette: Script that generates palettes by text description via stable diffusion. (original) (raw)
Automatic1111' Stable Diffusion webui custom script to generate palettes by text description. The script takes the generated images and converts them into color palettes.
Installation & usage
Сlone or download this repo and put the txt2palette.py file in a /scripts folder of your webui base dir.
To use the KMeans algorithm, add a scikit-learn to the requirements_versions.txt file in the base folder.
After launching the interface, select txt2palette from the list of scripts on the txt2img tab.
Examples
"Tokyo neon" Steps: 20, Sampler: Euler a, CFG scale: 7

"Underwater disco" Steps: 20, Sampler: Euler a, CFG scale: 7

"van gogh starry night" Steps: 20, Sampler: Euler a, CFG scale: 7

Improvement Ideas:
- Somehow save hex codes of palettes
Credits
The most important part of the script is based on the sources of Pylette color extractor: https://github.com/qTipTip/Pylette

