|
9 | 9 | import modules.async_worker as worker |
10 | 10 |
|
11 | 11 | from modules.sdxl_styles import style_keys, aspect_ratios, styles |
12 | | - |
13 | | -from random_prompt.build_dynamic_prompt import build_dynamic_prompt |
14 | | - |
15 | 12 | from modules.settings import load_settings |
16 | 13 |
|
17 | | -import onebutton_ui |
| 14 | +import ui_onebutton |
18 | 15 |
|
19 | 16 |
|
20 | 17 | def load_images_handler(files): |
@@ -48,7 +45,14 @@ def generate_clicked(*args): |
48 | 45 |
|
49 | 46 | settings = load_settings() |
50 | 47 |
|
51 | | -shared.gradio_root = gr.Blocks(title="RuinedFooocus " + fooocus_version.version, css=modules.html.css).queue() |
| 48 | +if settings["theme"] == "None": |
| 49 | + theme = gr.themes.Default() |
| 50 | +else: |
| 51 | + theme = settings["theme"] |
| 52 | + |
| 53 | +shared.gradio_root = gr.Blocks( |
| 54 | + theme=theme, title="RuinedFooocus " + fooocus_version.version, css=modules.html.css |
| 55 | +).queue() |
52 | 56 | with shared.gradio_root: |
53 | 57 | with gr.Row(): |
54 | 58 | with gr.Column(): |
@@ -213,7 +217,7 @@ def model_refresh_clicked(): |
213 | 217 |
|
214 | 218 | model_refresh.click(model_refresh_clicked, [], [base_model, refiner_model] + lora_ctrls) |
215 | 219 |
|
216 | | - onebutton_ui.ui_onebutton(prompt) |
| 220 | + ui_onebutton.ui_onebutton(prompt) |
217 | 221 |
|
218 | 222 | advanced_checkbox.change(lambda x: gr.update(visible=x), advanced_checkbox, right_col) |
219 | 223 | ctrls = [ |
@@ -245,5 +249,9 @@ def model_refresh_clicked(): |
245 | 249 | args = parser.parse_args() |
246 | 250 | favicon_path = "logo.ico" |
247 | 251 | shared.gradio_root.launch( |
248 | | - inbrowser=True, server_name=args.listen, server_port=args.port, share=args.share, favicon_path=favicon_path |
| 252 | + inbrowser=True, |
| 253 | + server_name=args.listen, |
| 254 | + server_port=args.port, |
| 255 | + share=args.share, |
| 256 | + favicon_path=favicon_path, |
249 | 257 | ) |
0 commit comments