diff options
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py index 70946fea..4e36df37 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -4,6 +4,7 @@ import os import gradio as gr
import torch
+import modules.artists
from modules.paths import script_path, sd_path
config_filename = "config.json"
@@ -47,6 +48,8 @@ class State: state = State()
+artist_db = modules.artists.ArtistsDatabase(os.path.join(script_path, 'artists.csv'))
+
class Options:
class OptionInfo:
@@ -84,6 +87,8 @@ class Options: "save_txt": OptionInfo(False, "Create a text file next to every image with generation parameters."),
"ESRGAN_tile": OptionInfo(192, "Tile size for ESRGAN upscaling. 0 = no tiling.", gr.Slider, {"minimum": 0, "maximum": 512, "step": 16}),
"ESRGAN_tile_overlap": OptionInfo(8, "Tile overlap, in pixels for ESRGAN upscaling. Low values = visible seam.", gr.Slider, {"minimum": 0, "maximum": 48, "step": 1}),
+ "random_artist_categories": OptionInfo([], "Allowed categories for random artists selection when using the Roll button", gr.CheckboxGroup, {"choices": artist_db.categories()}),
+ "upscale_at_full_resolution_padding": OptionInfo(16, "Inpainting at full resolution: padding, in pixels, for the masked region.", gr.Slider, {"minimum": 0, "maximum": 128, "step": 4}),
}
def __init__(self):
@@ -122,3 +127,5 @@ if os.path.exists(config_filename): sd_upscalers = []
sd_model = None
+
+
|