mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 03:10:21 +00:00
added random artist button
added a setting for padding when doing inpaint at original resolution
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user