flux hires and face-hires

This commit is contained in:
Vladimir Mandic
2024-09-06 15:30:58 -04:00
parent f2c5cbbb36
commit d62cb9a83f
3 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -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*
+2 -2
View File
@@ -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__
+1 -1
View File
@@ -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'):