| def register(options_templates, options_section, OptionInfo): | |
| from modules.ui_components import FormColorPicker | |
| options_templates.update( | |
| options_section( | |
| (None, "Forge Hidden Options"), | |
| { | |
| "forge_unet_storage_dtype": OptionInfo("Automatic"), | |
| "forge_inference_memory": OptionInfo(1024), | |
| "forge_async_loading": OptionInfo("Queue"), | |
| "forge_pin_shared_memory": OptionInfo("CPU"), | |
| "forge_preset": OptionInfo("sd"), | |
| "forge_additional_modules": OptionInfo([]), | |
| }, | |
| ) | |
| ) | |
| options_templates.update( | |
| options_section( | |
| ("ui_forgecanvas", "Forge Canvas", "ui"), | |
| { | |
| "forge_canvas_height": OptionInfo(512, "Canvas Height").info("in pixels").needs_reload_ui(), | |
| "forge_canvas_toolbar_always": OptionInfo(False, "Always Visible Toolbar").info("disabled: toolbar only appears when hovering the canvas").needs_reload_ui(), | |
| "forge_canvas_consistent_brush": OptionInfo(False, "Fixed Brush Size").info("disabled: the brush size is <b>pixel-space</b>, the brush stays small when zoomed out ; enabled: the brush size is <b>canvas-space</b>, the brush stays big when zoomed in").needs_reload_ui(), | |
| "forge_canvas_plain": OptionInfo(False, "Plain Background").info("disabled: checkerboard pattern ; enabled: solid color").needs_reload_ui(), | |
| "forge_canvas_plain_color": OptionInfo("#808080", "Solid Color for Plain Background", FormColorPicker, {}).needs_reload_ui(), | |
| }, | |
| ) | |
| ) | |