From 2c15fe035acffc1158c9e0f7d2c46aaa588bd7c0 Mon Sep 17 00:00:00 2001 From: JasonHoku Date: Sat, 28 Feb 2026 21:56:12 -0800 Subject: [PATCH] fix remote vae on distribution worker --- Roadmap.md | 33 +++++++++++++++++++++++++-------- batch_encoding.py | 2 +- config_builder_node.py | 2 +- distribution_worker.py | 8 +++++++- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/Roadmap.md b/Roadmap.md index a257d2b..17f9f4c 100644 --- a/Roadmap.md +++ b/Roadmap.md @@ -43,15 +43,38 @@ ProjectStructure.md has notes to assist AI in developing this project ### **ComfyUI Ultimate Sampler Grid – Development Roadmap** +## Batch Encoding -## Add on off switches in builder ui to text encoder selection and vae selection +## Add HF-RemoteVae list to BuilderUI Remote Vae (when Remote URL is selected, add a Presets: selection to choose which one from the list) +## bug fix, the Builder UI is very slow to update when first starting, adding models, adding loras, a few other things, we need to check it and optimize it to load and respond faster. + + +## Add on off switches in builder ui to text encoder selection and vae selection (nearly complete but vae on off switches don't work, also I'd prefer for simple omition from node output confg_json instead of adding uncessary on-off switches to the output) + +## In the Dashboard UI, I'd love to see a toggle option for view prompts without lora trigger-words. Currently it shows them all with them added and it causes a bit of a duplicate issue if we're just trying to see which prompts work best on variety of various loras. + + +## Models from UI aren't getting hashed properly for some reason, maybe diffusion models, maybe builder UI path / \ normalization? console logs: Using fallback hash for model: 559ad07aae + +## Add on off switches in builder ui to text encoder selection and vae selection that works exactly the same as the model on off switches + ## Add more info to the lora and model civitai lookups in the builderUI, option to show full API response, show full JSON response, save full JSON resposne, if lookup data is cached, show a big warning on the very top that says READ FROM DISK CACHE, LAST LOOKED UP ON {lookup date} - ## When you click a sampler or scheduler in the dropdown it should add it to the list right away. +## In the builder ui civit-ai lookup modal, when it alerts the user the data is cached and read from disk there needs to be a button for re-check/lookup now so they can get updated data when they want. + +## Feature: Adding permanent/saving/editing custom lora trigger words to a lora, read from and edit the lora_triggers.json file, with nice ui to make it easy and convenient to edit, remove and add triggerwords. + + + +#### **12. Arrays in LoRA Weights** Integrated but needs adding to the Builder UI + +Builder UI could have a + button right next to model strength text input (on its right side) to make it easy to add a compare different lora strengths. If activated it should add an additonal slider, or two sliders if 🔒 Lock Model & CLIP Strength Together is deactivated, for each time they click +. If a lora has a multiple strength array, the preview json and py node json_output should duplicate the full config for that run for each entry with the only difference being each lora strength. If multiple loras have multiple arrays it needs to output a cartesian of an each for each of all lora strenth combos. + + ## Save/Load/Import (Merge) Prompts. (With settable unique naming option) Load should offer a searchable dropdown menu for all past saved prompts. Let's store this data in a outputs/benchmarks/PromptsData folder. Each prompt/save should be its own file. @@ -105,12 +128,6 @@ A button in the builder UI to pack short sha256 into config with an explanation * **Status:** Implemented as per-config `model_prompt_prefix` and `model_prompt_suffix` fields. These quality tags are prepended/appended to ALL prompts for a given config, wrapping around the entire prompt+triggers assembly. Added `_apply_model_prompt_affixes()` helper in `trigger_words.py`, integrated into both `build_prompt_with_triggers()` and `collect_unique_prompts_with_triggers()` for correct pre-encoding. Config Builder UI shows prefix/suffix text inputs in the Prompts section of each config. Fields persist through save/load and are passed through `expand_configs()` in `config_utils.py`. * **Target Files:** `trigger_words.py`, `config_utils.py`, `conf-builder-config-management.js`, `conf-builder-utilities.js`, `conf-builder-main.js` -#### **12. Arrays in LoRA Weights** COMPLETED - -* **Problem:** Cannot grid search LoRA weights like `lora.safetensors:[0.5, 0.8]:1.0`. -* **Status:** Implemented `_expand_lora_weight_arrays()` in `config_utils.py`. Supports `[0.5, 0.8]` syntax in both model_strength and clip_strength positions, with Cartesian product for multiple arrays. -* **Target Files:** `config_utils.py` - #### **13. Real-Time ETA** COMPLETED * **Problem:** ETA only prints to server console. diff --git a/batch_encoding.py b/batch_encoding.py index de8e80a..75e82cf 100644 --- a/batch_encoding.py +++ b/batch_encoding.py @@ -366,7 +366,7 @@ def batch_encode_prompts(patched_clip, unique_positives, unique_negatives, cond_ # Save and print cache stats (only saves if disk cache is enabled) if cond_cache is not None: cond_cache.save() - cond_cache.print_stats() + # cond_cache.print_stats() # for debugging # Final cleanup after all encoding is complete gc.collect() diff --git a/config_builder_node.py b/config_builder_node.py index ea5b6bb..fa48867 100644 --- a/config_builder_node.py +++ b/config_builder_node.py @@ -1014,7 +1014,7 @@ async def refresh_models_endpoint(request): print(f"[ConfigBuilder] ❌ Error in refresh_models endpoint: {e}") import traceback traceback.print_exc() - return web.json_response({ + return web.json_response({ "error": str(e) }, status=500) diff --git a/distribution_worker.py b/distribution_worker.py index c839524..7d1c02e 100644 --- a/distribution_worker.py +++ b/distribution_worker.py @@ -308,9 +308,15 @@ class WorkerThread(threading.Thread): print(f"[Worker {self.worker_id}] 📦 Loaded model: {config['model']}") # --- Per-config VAE loading --- + # Workers only support local VAE — remote VAE endpoints (remote:https://...) + # are handled by the master's RemoteVAEDecodeWorker, so fall back to + # the model's bundled VAE when a remote VAE is specified. config_vae = config.get("vae", "Default") - if config_vae != "Default": + if config_vae != "Default" and not config_vae.startswith("remote:"): vae = load_vae_by_name(config_vae) + elif config_vae.startswith("remote:"): + print(f"[Worker {self.worker_id}] ⚠️ Skipping remote VAE '{config_vae}' — using model's bundled VAE") + vae = self._loaded_vae else: vae = self._loaded_vae