mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
sort and describe all scripts
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -9,7 +9,7 @@ debug = shared.log.trace if os.environ.get('SD_FACE_DEBUG', None) is not None el
|
||||
|
||||
class Script(scripts.Script):
|
||||
def title(self):
|
||||
return 'Face'
|
||||
return 'Face: Multiple ID Transfers'
|
||||
|
||||
def show(self, is_img2img):
|
||||
return True if shared.native else False
|
||||
@@ -45,7 +45,7 @@ class Script(scripts.Script):
|
||||
# return signature is array of gradio components
|
||||
def ui(self, _is_img2img):
|
||||
with gr.Row():
|
||||
gr.HTML("<span>  Face module</span><br>")
|
||||
gr.HTML("<span>  Face: Multiple ID Transfers</span><br>")
|
||||
with gr.Row():
|
||||
mode = gr.Dropdown(label='Mode', choices=['None', 'FaceID', 'FaceSwap', 'InstantID', 'PhotoMaker'], value='None')
|
||||
with gr.Group(visible=False) as cfg_faceid:
|
||||
|
||||
+3
-1
@@ -352,7 +352,9 @@ class ScriptRunner:
|
||||
self.selectable_scripts.clear()
|
||||
auto_processing_scripts = scripts_auto_postprocessing.create_auto_preprocessing_script_data()
|
||||
|
||||
for script_class, path, _basedir, _script_module in auto_processing_scripts + scripts_data:
|
||||
all_scripts = auto_processing_scripts + scripts_data
|
||||
sorted_scripts = sorted(all_scripts, key=lambda x: x.script_class().title().lower())
|
||||
for script_class, path, _basedir, _script_module in sorted_scripts:
|
||||
try:
|
||||
script = script_class()
|
||||
script.filename = path
|
||||
|
||||
@@ -246,7 +246,7 @@ def create_output_panel(tabname, preview=True, prompt=None, height=None):
|
||||
# columns are for <576px, <768px, <992px, <1200px, <1400px, >1400px
|
||||
result_gallery = gr.Gallery(value=[],
|
||||
label='Output', show_label=False, show_download_button=True, allow_preview=True, container=False, preview=preview,
|
||||
columns=5, object_fit='scale-down', height=height,
|
||||
columns=4, object_fit='scale-down', height=height,
|
||||
elem_id=f"{tabname}_gallery",
|
||||
)
|
||||
if prompt is not None:
|
||||
|
||||
Reference in New Issue
Block a user