├── LICENSE ├── README.md ├── .gitignore └── tool_shed └── sd_runes.py /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Roger Condori 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Interactive Stable Diffusion 2 | A widgets interface based on ipywidgets library for Stable Diffusion. 3 | 4 | 5 | ## Colab 6 | 7 | | Colab | Info 8 | | --- | --- | 9 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/R3gm/SD_diffusers_interactive/blob/main/Stable_diffusion_interactive_notebook.ipynb) | Interactive-SD Official 10 | 11 | Note: In this Colab, it is advisable to use the 'Generate in GUI' cell to keep your session active and prevent disconnection issues due to inactivity. 12 | 13 | ## GUI 14 | 15 | ![image](https://github.com/R3gm/SD_diffusers_interactive/assets/114810545/eecfc3f7-54d7-4951-a595-8c98f59a5d89) 16 | 17 | 18 | ## Features: 19 | 20 | ### Prompt Control: 21 | - **Positive Prompt:** Guide the model's image generation. 22 | - **Negative Prompt:** Specify elements to avoid in the generated image. 23 | - **Prompt Weights:** Emphasize or de-emphasize prompt aspects. 24 | - **Long Prompts:** Manage lengthy prompts with unlimited characters. 25 | 26 | ### Image Quality Control: 27 | - **Steps:** Determine denoise steps of image generation. 28 | - **CFG:** Adjust creativity vs. strict adherence to prompt. 29 | - **Sampler:** Reduce image noise through denoising. 30 | - **Seed:** Set seed for reproducibility or use -1 for random. 31 | - **Clip Skip:** Skip prompt adherence layers. 32 | 33 | ### Style and Adaptation: 34 | - **LoRA:** Store small modifications to SD model for efficiency. 35 | - **Embeddings:** Adapt model to a particular style. 36 | - **FreeU:** Improve diffusion model sample quality at no cost. 37 | - **VAE:** Choose VAE for different results. 38 | - **LCM:** Generate images with Latent Consistency Models. 39 | - **ControlNet:** Enhance context-aware image generation. 40 | - **Styles:** Add specific styles to generation. 41 | 42 | ### Inpainting and Image Modification: 43 | - **Inpaint:** Modify images or remove objects using diffusion model. 44 | - **Img2img:** Modify existing images based on text prompts. 45 | - **Adetailer:** Automate inpainting with adjustable strength. 46 | 47 | ### Resolution Enhancement: 48 | - **High-resolution:** Increase image size proportionally. 49 | - **Upscaling Tools:** Select different models and options for High-resolution. 50 | 51 | ### Additional Points: 52 | - **Compatibility**: Support for both ckpt and diffusers models, such as `cagliostrolab/animagine-xl-3.0`. 53 | - **Model version:** SD 1.5 and SDXL diffusers support 54 | - **Save images:** Automatically save the generated images and specify the saving directory. 55 | - **Generation Data:** Utilize generation data from previously generated images and configure the parameters in the GUI; currently, this functionality is only available for specific parameters. 56 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/#use-with-ide 110 | .pdm.toml 111 | 112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 113 | __pypackages__/ 114 | 115 | # Celery stuff 116 | celerybeat-schedule 117 | celerybeat.pid 118 | 119 | # SageMath parsed files 120 | *.sage.py 121 | 122 | # Environments 123 | .env 124 | .venv 125 | env/ 126 | venv/ 127 | ENV/ 128 | env.bak/ 129 | venv.bak/ 130 | 131 | # Spyder project settings 132 | .spyderproject 133 | .spyproject 134 | 135 | # Rope project settings 136 | .ropeproject 137 | 138 | # mkdocs documentation 139 | /site 140 | 141 | # mypy 142 | .mypy_cache/ 143 | .dmypy.json 144 | dmypy.json 145 | 146 | # Pyre type checker 147 | .pyre/ 148 | 149 | # pytype static type analyzer 150 | .pytype/ 151 | 152 | # Cython debug symbols 153 | cython_debug/ 154 | 155 | # PyCharm 156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 158 | # and can be added to the global gitignore or merged into this file. For a more nuclear 159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 160 | #.idea/ 161 | -------------------------------------------------------------------------------- /tool_shed/sd_runes.py: -------------------------------------------------------------------------------- 1 | # GUI Constants for Interactive SD 2 | 3 | DIFFUSERS_CONTROLNET_MODEL = [ 4 | "Automatic", 5 | 6 | "brad-twinkl/controlnet-union-sdxl-1.0-promax", 7 | "xinsir/controlnet-union-sdxl-1.0", 8 | "xinsir/anime-painter", 9 | "TheMistoAI/MistoLine", 10 | "Eugeoter/noob-sdxl-controlnet-canny", 11 | "Eugeoter/noob-sdxl-controlnet-lineart_anime", 12 | "Eugeoter/noob-sdxl-controlnet-depth", 13 | "Eugeoter/noob-sdxl-controlnet-normal", 14 | "Eugeoter/noob-sdxl-controlnet-softedge_hed", 15 | "Eugeoter/noob-sdxl-controlnet-scribble_pidinet", 16 | "Eugeoter/noob-sdxl-controlnet-scribble_hed", 17 | "Eugeoter/noob-sdxl-controlnet-manga_line", 18 | "Eugeoter/noob-sdxl-controlnet-lineart_realistic", 19 | "Eugeoter/noob-sdxl-controlnet-depth_midas-v1-1", 20 | "r3gm/controlnet-noobai-openpose-sdxl-fp16", 21 | "r3gm/controlnet-rough-coating-v1-sdxl-fp16", 22 | "r3gm/controlnet-line2color-v2-sdxl-fp16", 23 | "r3gm/controlnet-recolor-anime-sdxl-fp16", 24 | "r3gm/controlnet-Xdog_sketch-sdxl-fp16", 25 | "r3gm/controlnet-inpaint-dreamer-sdxl-fp16", 26 | "r3gm/controlnet-union-promax-sdxl-fp16", 27 | "r3gm/controlnet-inpaint-anime-sdxl-fp16", 28 | "r3gm/controlnet-kohaku-canny-sdxl-fp16", 29 | "r3gm/controlnet-openpose-sdxl-1.0-fp16", 30 | "r3gm/controlnet-canny-scribble-integrated-sdxl-v2-fp16", 31 | "r3gm/controlnet-union-sdxl-1.0-fp16", 32 | "r3gm/controlnet-lineart-anime-sdxl-fp16", 33 | "r3gm/control_v1p_sdxl_qrcode_monster_fp16", 34 | "r3gm/controlnet-tile-sdxl-1.0-fp16", 35 | "r3gm/controlnet-recolor-sdxl-fp16", 36 | "r3gm/controlnet-openpose-twins-sdxl-1.0-fp16", 37 | "r3gm/controlnet-qr-pattern-sdxl-fp16", 38 | "dimitribarbot/controlnet-dwpose-sdxl-1.0", 39 | "dimitribarbot/controlnet-openpose-sdxl-1.0-safetensors", 40 | "Yakonrus/SDXL_Controlnet_Tile_Realistic_v2", 41 | "briaai/BRIA-2.3-ControlNet-Recoloring", 42 | "briaai/BRIA-2.3-ControlNet-Canny", 43 | "briaai/BRIA-2.3-ControlNet-Pose", 44 | 45 | "lllyasviel/control_v11p_sd15_openpose", 46 | "lllyasviel/control_v11p_sd15_canny", 47 | "lllyasviel/control_v11f1p_sd15_depth", 48 | "lllyasviel/control_v11p_sd15_inpaint", 49 | "monster-labs/control_v1p_sd15_qrcode_monster", 50 | "yuanqiuye/qrcode_controlnet_v3", 51 | ] 52 | 53 | URL_HYP = "https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-" 54 | URL_PCM = "https://huggingface.co/wangfuyun/PCM_Weights/resolve/main/" 55 | OPTIMIZATION_PARAMS = { 56 | "None": [30, 7.5, 'DPM++ 2M', 'None', 'None', '', "", ""], 57 | "SPO": [30, 7.5, 'DPM++ 2M', 'spo-sd-v1-5_4k-p_10ep_lora_diffusers.safetensors', "spo_sdxl_10ep_4k-data_lora_diffusers.safetensors", "", "https://huggingface.co/SPO-Diffusion-Models/SPO-SD-v1-5_4k-p_10ep_LoRA/resolve/main/spo-sd-v1-5_4k-p_10ep_lora_diffusers.safetensors", "https://huggingface.co/SPO-Diffusion-Models/SPO-SDXL_4k-p_10ep_LoRA/resolve/main/spo_sdxl_10ep_4k-data_lora_diffusers.safetensors"], 58 | "DPO": [30, 7.5, 'DPM++ 2M', 'sd_1_5_dpo_lora_v1-128dim.safetensors', "sd_xl_dpo_lora_v1-128dim.safetensors", "", "https://civitai.com/api/download/models/269377", "https://civitai.com/api/download/models/269354"], 59 | "DPO Turbo": [8, 2.5, 'TCD', '', "sd_xl_dpo_turbo_lora_v1-128dim.safetensors", "", "", "https://huggingface.co/benjamin-paine/sd-dpo-offsets/resolve/a8751154f72cc87613067082f53e906abfac05d2/sd_xl_dpo_turbo_lora_v1-128dim.safetensors"], 60 | "Hyper 12step": [12, 5., 'TCD', 'Hyper-SD15-12steps-CFG-lora.safetensors', "Hyper-SDXL-12steps-CFG-lora.safetensors", "", f"{URL_HYP}SD15-12steps-CFG-lora.safetensors", f"{URL_HYP}SDXL-12steps-CFG-lora.safetensors"], 61 | "Hyper 8step": [8, 5., 'TCD', 'Hyper-SD15-8steps-CFG-lora.safetensors', "Hyper-SDXL-8steps-CFG-lora.safetensors", "", f"{URL_HYP}SD15-8steps-CFG-lora.safetensors", f"{URL_HYP}SDXL-8steps-CFG-lora.safetensors"], 62 | "Hyper 4step": [4, 0, 'TCD', 'Hyper-SD15-4steps-lora.safetensors', "Hyper-SDXL-4steps-lora.safetensors", "", f"{URL_HYP}SD15-4steps-lora.safetensors", f"{URL_HYP}SDXL-4steps-lora.safetensors"], 63 | "Hyper 2step": [2, 0, 'TCD', 'Hyper-SD15-2steps-lora.safetensors', "Hyper-SDXL-2steps-lora.safetensors", "", f"{URL_HYP}SD15-2steps-lora.safetensors", f"{URL_HYP}SDXL-2steps-lora.safetensors"], 64 | "Hyper 1step": [1, 0, 'TCD', 'Hyper-SD15-1step-lora.safetensors', "Hyper-SDXL-1step-lora.safetensors", "", f"{URL_HYP}SD15-1step-lora.safetensors", f"{URL_HYP}SDXL-1step-lora.safetensors"], 65 | "PCM 16step": [16, 4., 'TCD', 'pcm_sd15_normalcfg_16step_converted.safetensors', "pcm_sdxl_normalcfg_16step_converted.safetensors", "SGM Uniform", f"{URL_PCM}sd15/pcm_sd15_normalcfg_16step_converted.safetensors", f"{URL_PCM}sdxl/pcm_sdxl_normalcfg_16step_converted.safetensors"], 66 | "PCM 8step": [8, 4., 'TCD', 'pcm_sd15_normalcfg_8step_converted.safetensors', "pcm_sdxl_normalcfg_8step_converted.safetensors", "SGM Uniform", f"{URL_PCM}sd15/pcm_sd15_normalcfg_8step_converted.safetensors", f"{URL_PCM}sdxl/pcm_sdxl_normalcfg_8step_converted.safetensors"], 67 | "PCM 4step": [4, 2., 'TCD', 'pcm_sd15_smallcfg_4step_converted.safetensors', "pcm_sdxl_smallcfg_4step_converted.safetensors", "SGM Uniform", f"{URL_PCM}sd15/pcm_sd15_smallcfg_4step_converted.safetensors", f"{URL_PCM}sdxl/pcm_sdxl_smallcfg_4step_converted.safetensors"], 68 | "PCM 2step": [2, 1., 'TCD', 'pcm_sd15_smallcfg_2step_converted.safetensors', "pcm_sdxl_smallcfg_2step_converted.safetensors", "SGM Uniform", f"{URL_PCM}sd15/pcm_sd15_smallcfg_2step_converted.safetensors", f"{URL_PCM}sdxl/pcm_sdxl_smallcfg_2step_converted.safetensors"], 69 | "Lightning 8step": [8, 0., 'Euler', '', "sdxl_lightning_8step_lora.safetensors", "SGM Uniform", "", "https://huggingface.co/ByteDance/SDXL-Lightning/resolve/main/sdxl_lightning_8step_lora.safetensors"], # for realistic use 'Euler a trailing' 70 | "Lightning 4step": [4, 0., 'Euler', '', "sdxl_lightning_4step_lora.safetensors", "SGM Uniform", "", "https://huggingface.co/ByteDance/SDXL-Lightning/resolve/main/sdxl_lightning_4step_lora.safetensors"], 71 | "Lightning 2step": [2, 0., 'Euler', '', "sdxl_lightning_2step_lora.safetensors", "SGM Uniform", "", "https://huggingface.co/ByteDance/SDXL-Lightning/resolve/main/sdxl_lightning_2step_lora.safetensors"], 72 | "DMD2 4step": [4, 0., 'LCM', '', 'dmd2_sdxl_4step_lora_fp16.safetensors', '', '', 'https://huggingface.co/tianweiy/DMD2/resolve/main/dmd2_sdxl_4step_lora_fp16.safetensors'], 73 | "Flash 4step": [4, 0., 'LCM', 'jasperai/flash-sd', 'jasperai/flash-sdxl', 'SGM Uniform', '', ''], 74 | "LCM": [8, 0., 'LCM Auto-Loader', '', "", "", "", ""], 75 | "TCD": [8, 0., 'TCD Auto-Loader', '', "", "", "", ""], 76 | } 77 | VALID_OPTI_LORA = list(OPTIMIZATION_PARAMS.keys())[1:18] 78 | 79 | MODELS_PROMPT_ENHANCER = [ 80 | "None", 81 | "Lamini medium", 82 | "Lamini long", 83 | "T5 flux", 84 | "MagicPrompt", 85 | "Daspartho prompt", 86 | "SmolLM2", 87 | ] 88 | 89 | QUALITY_PROMPT_LIST = [ 90 | { 91 | "name": "None", 92 | "prompt": [], 93 | "negative_prompt": [], 94 | }, 95 | { 96 | "name": "Common", 97 | "prompt": ['(masterpiece)', '(best quality)', '(ultra-detailed)', 'intricate details'], 98 | "negative_prompt": ['longbody', 'lowres', 'bad anatomy', 'bad hands', 'missing fingers', 'pubic hair', 'extra digit', 'fewer digits', 'worst quality', 'low quality', 'very displeasing', '(bad)'], 99 | }, 100 | { 101 | "name": "Animagine Common", 102 | "prompt": ['anime artwork', 'anime style', 'vibrant', 'studio anime', 'highly detailed', 'masterpiece', 'best quality', 'very aesthetic', 'absurdres'], 103 | "negative_prompt": ['lowres', '(bad)', 'text', 'error', 'fewer', 'extra', 'missing', 'worst quality', 'jpeg artifacts', 'low quality', 'watermark', 'unfinished', 'displeasing', 'oldest', 'early', 'chromatic aberration', 'signature', 'extra digits', 'artistic error', 'username', 'scan', '[abstract]'], 104 | }, 105 | { 106 | "name": "Realistic Common", 107 | "prompt": ['RAW photo', 'sharp details', 'hyperrealistic', 'dynamic pose', 'dynamic background', 'cinematic lighting'], 108 | "negative_prompt": ['octane render', 'render', 'drawing', 'anime', 'worst quality', 'low quality', 'bad photo', '3d', '2d', 'painting', 'cartoons', 'sketch', 'bad photography', 'blurry', 'open mouth', 'bad anatomy', 'bad hands', 'missing fingers', 'deformed iris', 'deformed pupils', 'deformed eyes', 'bad eyes', 'deformed face', 'ugly face', 'bad face', 'deformed hands', 'bad hands', 'fused fingers', 'morbid', 'mutilated', 'mutation', 'disfigured'], 109 | }, 110 | { 111 | "name": "Pony Common", 112 | "prompt": [], 113 | "negative_prompt": ['busty', 'ugly face', 'mutated hands', 'low res', 'blurry face', 'black and white', 'the simpsons', 'overwatch', 'apex legends'], 114 | }, 115 | { 116 | "name": "Pony Anime Common", 117 | "prompt": ['masterpiece', 'best quality', 'very aesthetic', 'absurdres'], 118 | "negative_prompt": ['busty', 'ugly face', 'mutated hands', 'low res', 'blurry face', 'black and white', 'the simpsons', 'overwatch', 'apex legends'], 119 | }, 120 | { 121 | "name": "Pony Realism Common", 122 | "prompt": ['RAW photo', 'sharp details', 'hyperrealistic', 'dynamic pose', 'dynamic background', 'cinematic lighting'], 123 | "negative_prompt": ['octane render', 'render', 'drawing', 'anime', 'worst quality', 'low quality', 'bad photo', '3d', '2d', 'painting', 'cartoons', 'sketch', 'bad photography', 'blurry', 'open mouth', 'bad anatomy', 'bad hands', 'missing fingers', 'deformed iris', 'deformed pupils', 'deformed eyes', 'bad eyes', 'deformed face', 'ugly face', 'bad face', 'deformed hands', 'bad hands', 'fused fingers', 'morbid', 'mutilated', 'mutation', 'disfigured'], 124 | }, 125 | { 126 | "name": "Animagine Standard v3.0", 127 | "prompt": ['masterpiece', 'best quality'], 128 | "negative_prompt": ['lowres', 'bad anatomy', 'bad hands', 'text', 'error', 'missing fingers', 'extra digit', 'fewer digits', 'cropped', 'worst quality', 'low quality', 'normal quality', 'jpeg artifacts', 'signature', 'watermark', 'username', 'blurry', 'artist name'], 129 | }, 130 | { 131 | "name": "Animagine Standard v3.1", 132 | "prompt": ['masterpiece', 'best quality', 'very aesthetic', 'absurdres'], 133 | "negative_prompt": ['lowres', '(bad)', 'text', 'error', 'fewer', 'extra', 'missing', 'worst quality', 'jpeg artifacts', 'low quality', 'watermark', 'unfinished', 'displeasing', 'oldest', 'early', 'chromatic aberration', 'signature', 'extra digits', 'artistic error', 'username', 'scan', '[abstract]'], 134 | }, 135 | { 136 | "name": "Animagine Light v3.1", 137 | "prompt": ['(masterpiece)', 'best quality', 'very aesthetic', 'perfect face'], 138 | "negative_prompt": ['(low quality', 'worst quality:1.2)', 'very displeasing', '3d', 'watermark', 'signature', 'ugly', 'poorly drawn'], 139 | }, 140 | { 141 | "name": "Animagine Heavy v3.1", 142 | "prompt": ['(masterpiece)', '(best quality)', '(ultra-detailed)', 'very aesthetic', 'illustration', 'disheveled hair', 'perfect composition', 'moist skin', 'intricate details'], 143 | "negative_prompt": ['longbody', 'lowres', 'bad anatomy', 'bad hands', 'missing fingers', 'pubic hair', 'extra digit', 'fewer digits', 'cropped', 'worst quality', 'low quality', 'very displeasing'], 144 | }, 145 | { 146 | "name": "Animagine v4.0 Common", 147 | "prompt": ['masterpiece', 'high score', 'great score', 'absurdres'], 148 | "negative_prompt": ['lowres', 'bad anatomy', 'bad hands', 'text', 'error', 'missing finger', 'extra digits', 'fewer digits', 'cropped', 'worst quality', 'low quality', 'low score', 'bad score', 'average score', 'signature', 'watermark', 'username', 'blurry'], 149 | }, 150 | { 151 | "name": "One obsession Common", 152 | "prompt": ['masterpiece', 'best quality', 'amazing quality', 'very awa', 'absurdres', 'newest', 'very aesthetic', 'depth of field', 'highres'], 153 | "negative_prompt": ['worst quality', 'normal quality', 'anatomical nonsense', 'bad anatomy', 'interlocked fingers', 'extra fingers', 'watermark', 'simple background', 'transparent', 'low quality', 'logo', 'text', 'signature', 'face backlighting', 'backlighting'], 154 | }, 155 | { 156 | "name": "NoobAI Common", 157 | "prompt": ['masterpiece', 'best quality', 'newest', 'absurdres', 'highres'], 158 | "negative_prompt": ['worst quality', 'old', 'early', 'low quality', 'lowres', 'signature', 'username', 'logo', 'bad hands', 'mutated hands', 'mammal', 'anthro', 'furry', 'ambiguous form', 'feral', 'semi-anthro'], 159 | }, 160 | { 161 | "name": "Nova Pony Common", 162 | "prompt": [], 163 | "negative_prompt": ['score_4', 'score_5', '3d', 'jpeg artifacts', 'username', 'watermark', 'signature', 'normal quality', 'worst quality', 'large head', 'low quality', 'text', 'error', 'missing fingers', 'extra digits', 'fewer digits', 'bad eye'], 164 | }, 165 | { 166 | "name": "Nova Illustrious Common", 167 | "prompt": ['BREAK', 'depth of field', 'volumetric lighting'], 168 | "negative_prompt": ['old', 'oldest', 'cartoon', 'graphic', 'text', 'painting', 'crayon', 'graphite', 'abstract', 'glitch', 'deformed', 'mutated', 'ugly', 'disfigured', 'long body', 'lowres', 'bad anatomy', 'bad hands', 'missing fingers', 'extra digits', 'fewer digits', 'cropped', 'very displeasing', '(worst quality)', '(bad quality)', 'bad anatomy', 'sketch', 'jpeg artifacts', 'watermark', 'username', 'signature', 'simple background', 'conjoined', 'bad ai-generated'], 169 | }, 170 | ] 171 | 172 | NOVA_PONY_PREFIX = ['score_9', 'score_8_up', 'score_7_up', 'score_6_up', 'score_5_up', 'score_4_up', 'source_anime', 'BREAK'] 173 | NOVA_ILLUS_PREFIX = ['masterpiece', 'best quality', 'amazing quality', 'very aesthetic', 'high resolution', 'ultra-detailed', 'absurdres', 'newest', 'scenery'] 174 | PONY_PREFIX = ['score_9', 'score_8_up', 'score_7_up', 'BREAK'] 175 | PONY_NEGATIVE_PREFIX = ['score_4', 'score_5', 'score_6', 'score_1', 'score_2', 'score_3'] 176 | PONY_ANIME_PREFIX = ['source_anime'] 177 | PONY_NEGATIVE_REALISM_AND_ANIME = ['source_pony', 'source_furry', 'source_cartoon'] 178 | 179 | AVAILABLE_PREFIX_LIST = [ 180 | { 181 | "name": "Pony Common", 182 | "prompt": PONY_PREFIX, 183 | "negative_prompt": PONY_NEGATIVE_PREFIX, 184 | "var_negative_prompt": -3, 185 | }, 186 | { 187 | "name": "Pony Anime Common", 188 | "prompt": PONY_ANIME_PREFIX + PONY_PREFIX, 189 | "negative_prompt": PONY_NEGATIVE_REALISM_AND_ANIME + PONY_NEGATIVE_PREFIX, 190 | "var_negative_prompt": -3, 191 | }, 192 | { 193 | "name": "Pony Realism Common", 194 | "prompt": PONY_PREFIX, 195 | "negative_prompt": PONY_NEGATIVE_REALISM_AND_ANIME + PONY_NEGATIVE_PREFIX, 196 | "var_negative_prompt": -3, 197 | }, 198 | { 199 | "name": "Nova Pony Common", 200 | "prompt": NOVA_PONY_PREFIX, 201 | "negative_prompt": [], 202 | }, 203 | { 204 | "name": "Nova Illustrious Common", 205 | "prompt": NOVA_ILLUS_PREFIX, 206 | "negative_prompt": [], 207 | }, 208 | ] 209 | 210 | all_original_resolutions = [ 211 | # SDXL 212 | [1152, 896], [1216, 832], [1344, 768], [1536, 640], [1792, 512], 213 | [1280, 720], [1920, 1080], [2048, 856], [1920, 800], 214 | [768, 768], [704, 1280], [1280, 1280], [1280, 800], 215 | [1024, 1536], [768, 1280], [704, 1408], 216 | [1536, 1536], [1728, 1344], [1824, 1248], [2016, 1152], 217 | # SD 1.5 218 | [512, 512], [512, 768], [640, 640], [384, 512], 219 | [768, 768], [576, 704], [832, 512], 220 | ] 221 | ratios = [ 222 | 2/3, 3/4, 4/5, 16/9, 1/1, 4/3, 1.43, 1.66, 16/10, 223 | 1.85, 2.35, 2.39, 1.618, 2/1, 21/9, 6/5, 32/27, 71/40 224 | ] 225 | --------------------------------------------------------------------------------