From d62cb9a83fa127911891426e2b86264d5877a009 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 6 Sep 2024 15:30:58 -0400 Subject: [PATCH] flux hires and face-hires --- CHANGELOG.md | 5 +++-- modules/modeldata.py | 4 ++-- modules/sd_samplers.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fe9b8691..133aee806 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Major refactor of [FLUX.1](https://blackforestlabs.ai/announcing-black-forest-labs/) support: - Full **ControlNet** support, better **LoRA** support, full **prompt attention** support, - Faster execution, more flexible loading, additional quantization options, and more... -- Added **image-to-image**, **inpaint** and **outpaint** modes +- Added **image-to-image**, **inpaint**, **outpaint**, **hires** modes - Since both *Optimum-Quanto* and *BitsAndBytes* libraries are limited in their platform support matrix, try enabling **NNCF** for quantization/compression on-the-fly! @@ -50,7 +50,8 @@ Plus tons of minor items and fixes - see [changelog](https://github.com/vladmand this brings supported quants to: *nf4/fp8/fp4/qint8/qint4* - vae support *fp16* - **lora** support additional training tools -- support fuse-qkv projections +- **face-hires** support +- support **fuse-qkv** projections can speed up generate enable via *settings -> compute -> fused projections* diff --git a/modules/modeldata.py b/modules/modeldata.py index 621fe71d6..52895857d 100644 --- a/modules/modeldata.py +++ b/modules/modeldata.py @@ -103,9 +103,9 @@ class Shared(sys.modules[__name__].__class__): model_type = 'sc' elif "AuraFlow" in self.sd_model.__class__.__name__: model_type = 'auraflow' - elif "FluxPipeline" in self.sd_model.__class__.__name__ or "FluxControlNetPipeline" in self.sd_model.__class__.__name__: + elif "Flux" in self.sd_model.__class__.__name__: model_type = 'f1' - elif "CogVideoXPipeline" in self.sd_model.__class__.__name__ or "CogVideoXVideoToVideoPipeline": + elif "CogVideo" in self.sd_model.__class__.__name__: model_type = 'cogvideox' else: model_type = self.sd_model.__class__.__name__ diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index 6d86b1bf1..61e17df8f 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -71,7 +71,7 @@ def create_sampler(name, model): sampler = config.constructor(model) if shared.sd_model_type == 'f1': if 'base_image_seq_len' not in sampler.sampler.config or 'max_image_seq_len' not in sampler.sampler.config or 'base_shift' not in sampler.sampler.config or 'max_shift' not in sampler.sampler.config: - shared.log.warning(f'FLUX: sampler="{name}" non compatible') + shared.log.warning(f'FLUX: sampler="{name}" unsupported') # sampler.sampler.register_to_config(base_image_seq_len=256, max_image_seq_len=4096, base_shift=0.5, max_shift=1.15) return None if not hasattr(model, 'scheduler_config'):