diff --git a/routes/settings_routes.py b/routes/settings_routes.py index efa7a7d..f3e8aca 100644 --- a/routes/settings_routes.py +++ b/routes/settings_routes.py @@ -13,7 +13,6 @@ def config_editor(): config = configparser.ConfigParser() config.read(CONFIG_PATH) - # Load from config directly — no helper functions needed anymore topics = config.get('comfyui', 'topics', fallback='').split(',') general_models = config.get('comfyui', 'models', fallback='').split(',') flux_models = config.get('comfyui:flux', 'models', fallback='').split(',') @@ -64,7 +63,12 @@ def config_editor(): continue form_key = f"{section}:{key}" if form_key in request.form: - config[section][key] = request.form[form_key] + new_value = request.form[form_key] + # Prevent overwriting masked secrets unless actually changed + if key in ('password_for_auth', 'api_key') and new_value == "********": + continue # Skip overwriting + config[section][key] = new_value + # Save everything at once with open(CONFIG_PATH, 'w') as configfile: @@ -87,8 +91,8 @@ def config_editor(): return render_template( 'settings.html', - topics=topics, - models=general_models + flux_models, + topics=sorted(topics,key=str.lower), + models=sorted(general_models + flux_models,key=str.lower), config_sections=filtered_config.keys(), config_values=filtered_config ) diff --git a/templates/settings.html b/templates/settings.html index 591b582..bdc538f 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -161,9 +161,19 @@ {% else %} + {% if key in ['password_for_auth', 'api_key'] %} + + {% elif value.lower() in ['true', 'false'] %} + + {% else %} {% endif %} + {% endif %} + {% endfor %} {% endfor %} diff --git a/workflow_flux.json b/workflow_flux.json index d1a3a64..4b0d840 100644 --- a/workflow_flux.json +++ b/workflow_flux.json @@ -15,31 +15,6 @@ "title": "VAE Decode" } }, - "32": { - "inputs": { - "upscale_model": [ - "33", - 0 - ], - "image": [ - "8", - 0 - ] - }, - "class_type": "ImageUpscaleWithModel", - "_meta": { - "title": "Upscale Image" - } - }, - "33": { - "inputs": { - "model_name": "4x-UltraSharp.pth" - }, - "class_type": "UpscaleModelLoader", - "_meta": { - "title": "Load Upscale Model" - } - }, "40": { "inputs": { "int": 20 @@ -125,7 +100,7 @@ ] }, "images": [ - "32", + "8", 0 ] }, @@ -136,7 +111,7 @@ }, "44": { "inputs": { - "text": "", + "text": "Yautja Predator wielding flamethrower in smoky, cyberpunk alleyway darkness", "speak_and_recognation": { "__value__": [ false, @@ -188,7 +163,7 @@ }, "48": { "inputs": { - "seed": 293172455045072, + "seed": 47371998700984, "increment": 1 }, "class_type": "Seed Generator (Image Saver)", @@ -287,7 +262,7 @@ 0 ], "model": [ - "74", + "35", 0 ] }, @@ -311,7 +286,7 @@ "67": { "inputs": { "model": [ - "74", + "35", 0 ], "conditioning": [ @@ -329,8 +304,8 @@ "clip_name1": "t5-v1_1-xxl-encoder-Q4_K_M.gguf", "clip_name2": "clip_l.safetensors", "type": "flux", - "device": "cuda:1", - "virtual_vram_gb": 4, + "device": "cuda:0", + "virtual_vram_gb": 0, "use_other_vram": false, "expert_mode_allocations": "" }, @@ -342,22 +317,22 @@ "73": { "inputs": { "vae_name": "FLUX1/ae.safetensors", - "device": "cuda:1" + "device": "cuda:0" }, "class_type": "VAELoaderMultiGPU", "_meta": { "title": "VAELoaderMultiGPU" } }, - "74": { + "35": { "inputs": { "unet_name": "flux1-dev-Q4_0.gguf", "dequant_dtype": "default", "patch_dtype": "default", "patch_on_device": false, - "device": "cuda:0", - "virtual_vram_gb": 8, - "use_other_vram": true, + "device": "cuda:1", + "virtual_vram_gb": 0, + "use_other_vram": false, "expert_mode_allocations": "" }, "class_type": "UnetLoaderGGUFAdvancedDisTorchMultiGPU",