From f5253dad952dadb90d8111b31f23ee7aff0b4c52 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 11 Oct 2024 09:53:46 -0400 Subject: [PATCH] update gguf notes and lint Signed-off-by: Vladimir Mandic --- .pylintrc | 11 +++++----- .ruff.toml | 33 ++++++++++++++-------------- CHANGELOG.md | 14 +++++++----- modules/model_flux.py | 3 ++- modules/ui_extra_networks_history.py | 1 + wiki | 2 +- 6 files changed, 35 insertions(+), 29 deletions(-) diff --git a/.pylintrc b/.pylintrc index 7bf2523ce..9e01ea996 100644 --- a/.pylintrc +++ b/.pylintrc @@ -7,9 +7,13 @@ fail-on= fail-under=10 ignore=CVS ignore-paths=/usr/lib/.*$, + modules/apg, modules/control/proc, modules/control/units, + modules/ctrlx, + modules/dcsolver, modules/dml, + modules/ggml, modules/hidiffusion, modules/hijack, modules/intel/ipex, @@ -18,17 +22,14 @@ ignore-paths=/usr/lib/.*$, modules/ldsr, modules/onnx_impl, modules/pag, + modules/prompt_parser_xhinker.py, modules/rife, modules/taesd, modules/todo, modules/unipc, - modules/xadapter, - modules/dcsolver, - modules/ctrlx, modules/vdm, - modules/apg, + modules/xadapter, repositories, - modules/prompt_parser_xhinker.py, extensions-builtin/sd-webui-agent-scheduler, extensions-builtin/sd-extension-chainner/nodes, extensions-builtin/sdnext-modernui/node_modules, diff --git a/.ruff.toml b/.ruff.toml index 5731fde69..93f4bff2b 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -3,26 +3,27 @@ exclude = [ ".git", ".ruff_cache", ".vscode", - "modules/hidiffusion", - "modules/hijack", - "modules/k-diffusion", - "modules/ldsr", - "modules/pag", - "modules/rife", - "modules/taesd", - "modules/todo", - "modules/unipc", - "modules/xadapter", - "modules/dcsolver", - "modules/vdm", - "modules/intel/openvino", - "modules/intel/ipex", - "modules/segmoe", "modules/apg", "modules/control/proc", "modules/control/units", - "modules/prompt_parser_xhinker.py", + "modules/dcsolver", + "modules/ggml", + "modules/hidiffusion", + "modules/hijack", + "modules/intel/ipex", + "modules/intel/openvino", + "modules/k-diffusion", + "modules/ldsr", + "modules/pag", "modules/postprocess/aurasr_arch.py", + "modules/prompt_parser_xhinker.py", + "modules/rife", + "modules/segmoe", + "modules/taesd", + "modules/todo", + "modules/unipc", + "modules/vdm", + "modules/xadapter", "repositories", "extensions-builtin/sd-extension-chainner/nodes", "extensions-builtin/sd-webui-agent-scheduler", diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c82db9c9..3da5402a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Change Log for SD.Next -## Update for 2024-10-09 +## Update for 2024-10-11 -### Highlights for 2024-10-09 +### Highlights for 2024-10-11 - **Reprocess**: New workflow options that allow you to generate at lower quality and then reprocess at higher quality for select images only or generate without hires/refine and then reprocess with hires/refine @@ -12,13 +12,14 @@ - Integration with [Ctrl+X](https://github.com/genforce/ctrl-x) which allows for control of **structure and appearance** without the need for extra models, [APG: Adaptive Projected Guidance](https://arxiv.org/pdf/2410.02416) for optimal **guidance** control, [LinFusion](https://github.com/Huage001/LinFusion) for on-the-fly distillation of any sd15/sdxl model +- Several of [Flux.1](https://huggingface.co/black-forest-labs/FLUX.1-dev) optimizations and new quantization types - Auto-detection of best available **device/dtype** settings for your platform and GPU reduces neeed for manual configuration - Full rewrite of **sampler options**, not far more streamlined with tons of new options to tweak scheduler behavior - Improved **LoRA** detection and handling for all supported models And other goodies like multiple *XYZ grid* improvements, additional *Flux ControlNets*, additional *Interrogate models*, better *LoRA tags* support, and more... -### Details for 2024-10-09 +### Details for 2024-10-11 - **reprocess** - new top-level button: reprocess latent from your history of generated image(s) @@ -115,7 +116,10 @@ And other goodies like multiple *XYZ grid* improvements, additional *Flux Contro - can reduce vram use for high resolutions and increase performance - *note*: use lower cfg scales as typical for distilled models -- **flux** +- [Flux](https://huggingface.co/black-forest-labs/FLUX.1-dev) + - see [wiki](https://github.com/vladmandic/automatic/wiki/FLUX#quantization) for details on `gguf` + - support for `gguf` binary format for loading unet/transformer component + - support for `gguf` binary format for loading t5/text-encoder component: requires transformers pr - avoid unet load if unchanged - mark specific unet as unavailable if load failed - fix diffusers local model name parsing @@ -205,8 +209,6 @@ And other goodies like multiple *XYZ grid* improvements, additional *Flux Contro - massive log cleanup - full lint pass - improve inference mode handling -- **experimental** - - flux t5 load from gguf: requires transformers pr ## Update for 2024-09-13 diff --git a/modules/model_flux.py b/modules/model_flux.py index 0c5bb41b8..95c89e451 100644 --- a/modules/model_flux.py +++ b/modules/model_flux.py @@ -152,7 +152,8 @@ def load_flux_gguf(file_path): skipped += 1 continue applied += 1 - sd_hijack_accelerate.hijack_set_module_tensor_simple(transformer, param_name, device=0, value=param) + sd_hijack_accelerate.hijack_set_module_tensor_simple(transformer, tensor_name=param_name, value=param, device=0) + state_dict[param_name] = None shared.log.debug(f'Load model: type=Unet/Transformer applied={applied} skipped={skipped} stats={stats}') return transformer, None diff --git a/modules/ui_extra_networks_history.py b/modules/ui_extra_networks_history.py index 72f31731a..44a9df050 100644 --- a/modules/ui_extra_networks_history.py +++ b/modules/ui_extra_networks_history.py @@ -37,3 +37,4 @@ class ExtraNetworksPageHistory(ui_extra_networks.ExtraNetworksPage): items = [l for l in shared.history.latents if l.name == name] if len(items) > 0: return items[0].info + return '' diff --git a/wiki b/wiki index fa80fa007..0f7bea9ed 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit fa80fa0071aea16285359b1ebfacd21b385efad4 +Subproject commit 0f7bea9edffde23c35395da37ff4ed390c94306e