From 6f05ae71cd27a1fe9c1aeb2373182df8c296ea92 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 28 Oct 2025 09:18:56 -0400 Subject: [PATCH] add LibreFlux segmentation controlnet for FLUX.1 Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 10 ++++++---- modules/control/units/controlnet.py | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 986f97666..35faeec70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,11 +21,16 @@ - **Community**: community highlights examples: *Tempest, Juggernaut, Illustrious, Pony, NoobAI, etc.* and all reference models have new preview images, thanks @liutyi -- **Models** +- **Models Reference** - [Tencent HunyuanImage 2.1](https://huggingface.co/tencent/HunyuanImage-2.1) in *full*, *distilled* and *refiner* variants HunyuanImage-2.1 is a large (51GB) T2I model capable of natively generating 2K images and uses Qwen2.5 + T5 text-encoders and 32x VAE - [Pony 7](https://huggingface.co/purplesmartai/pony-v7-base) Pony 7 steps in a different direction from previous Pony models and is based on AuraFlow architecture and UMT5 encoder +- **Models Auxiliary** + - add **Qwen 3-VL** VLM for interrogate and prompt enhance, thanks @CalamitousFelicitousness + this includes *2B, 4B and 8B* variants + - add **Apple DepthPro** controlnet processor, thanks @nolbert82 + - add **LibreFlux** segmentation controlnet for FLUX.1 - **Features** - **offline mode**: enable in *settings -> hugginface* enables fully offline mode where previously downloaded models can be used as-is @@ -46,9 +51,6 @@ - **scheduler** add base and max shift parameters for flow-matching samplers - enhance `--optional` flag to pre-install optional packages - add `[lora]` to recognized filename patterns - - add **Apple DepthPro** controlnet processor, thanks @nolbert82 - - add **Qwen 3-VL** llm for interrogate and prompt enhance, thanks @CalamitousFelicitousness - this includes *2B, 4B and 8B* variants - when using **shared-t5** *(default)*, it will load standard or pre-quant depending on model - enhanced LoRA support for **Wan-2.2-14B** - **Fixes** diff --git a/modules/control/units/controlnet.py b/modules/control/units/controlnet.py index 7fd9cab0f..193df5cf5 100644 --- a/modules/control/units/controlnet.py +++ b/modules/control/units/controlnet.py @@ -89,7 +89,8 @@ predefined_f1 = { "Shakker-Labs Depth F1": 'Shakker-Labs/FLUX.1-dev-ControlNet-Depth', "XLabs-AI Canny F1": 'XLabs-AI/flux-controlnet-canny-diffusers', "XLabs-AI Depth F1": 'XLabs-AI/flux-controlnet-depth-diffusers', - "XLabs-AI HED F1": 'XLabs-AI/flux-controlnet-hed-diffusers' + "XLabs-AI HED F1": 'XLabs-AI/flux-controlnet-hed-diffusers', + "LibreFlux F1": 'neuralvfx/LibreFlux-ControlNet', } predefined_sd3 = { "StabilityAI Canny SD35": 'diffusers-internal-dev/sd35-controlnet-canny-8b', @@ -119,6 +120,15 @@ variants = { 'NoobAI SoftEdge XL': 'fp16', 'TTPlanet Tile Realistic XL': 'fp16', } + +subfolders = { + "LibreFlux F1": 'controlnet', +} + +remote_code = { + "LibreFlux F1": True, +} + models = {} all_models = {} all_models.update(predefined_sd15) @@ -326,6 +336,10 @@ class ControlNet(): self.load_config['use_safetensors'] = True if variants.get(model_id, None) is not None: kwargs['variant'] = variants[model_id] + if subfolders.get(model_id, None) is not None: + self.load_config['subfolder'] = subfolders[model_id] + if remote_code.get(model_id, None) is not None: + self.load_config['trust_remote_code'] = remote_code[model_id] try: self.model = cls.from_pretrained(model_path, **self.load_config, **kwargs) except Exception as e: