diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-21 05:36:07 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-21 05:36:07 +0000 |
commit | 40ff6db5325fc34ad4fa35e80cb1e7768d9f7e75 (patch) | |
tree | 75230fd3b1c9c53593aca65d7260b62b6df2d82b /modules/ui_components.py | |
parent | e33cace2c2074ef342d027c1f31ffc4b3c3e877e (diff) | |
download | stable-diffusion-webui-gfx803-40ff6db5325fc34ad4fa35e80cb1e7768d9f7e75.tar.gz stable-diffusion-webui-gfx803-40ff6db5325fc34ad4fa35e80cb1e7768d9f7e75.tar.bz2 stable-diffusion-webui-gfx803-40ff6db5325fc34ad4fa35e80cb1e7768d9f7e75.zip |
extra networks UI
rework of hypernets: rather than via settings, hypernets are added directly to prompt as <hypernet:name:weight>
Diffstat (limited to 'modules/ui_components.py')
-rw-r--r-- | modules/ui_components.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/ui_components.py b/modules/ui_components.py index 97acff06..46324425 100644 --- a/modules/ui_components.py +++ b/modules/ui_components.py @@ -11,6 +11,16 @@ class ToolButton(gr.Button, gr.components.FormComponent): return "button"
+class ToolButtonTop(gr.Button, gr.components.FormComponent):
+ """Small button with single emoji as text, with extra margin at top, fits inside gradio forms"""
+
+ def __init__(self, **kwargs):
+ super().__init__(variant="tool-top", **kwargs)
+
+ def get_block_name(self):
+ return "button"
+
+
class FormRow(gr.Row, gr.components.FormComponent):
"""Same as gr.Row but fits inside gradio forms"""
|