Commit Graph

227 Commits

Author SHA1 Message Date
CalamitousFelicitousness 0515da673d fix(anima): handle net. prefix on custom transformer files
NVIDIA/Cosmos native exports prefix every key with net., including the
bundled llm_adapter half. Add it to KNOWN_PREFIXES so partition_adapter
runs on stripped keys.
2026-04-25 11:47:45 +01:00
CalamitousFelicitousness 4af3a57741 feat(anima): native lora across transformer, llm_adapter, text encoder
Dispatch anima loras through a dedicated native loader covering kohya,
bfl/ai-toolkit, and hybrid (bfl with alpha plus qwen3 text encoder)
formats. Cosmos 2.0 path rename is mirrored from diffusers in flat
(underscore) form so rewritten paths match network_layer_mapping keys
without further conversion.

Split model_type from cosmos to anima so a future base-cosmos2 lora
path stays separable. Update flow_models, taesd supported list, and the
taesd wanvideo bucket so samplers and preview decoding keep working
after the split.

Extend assign_network_names_to_compvis_modules to walk pipe.llm_adapter
under the lora_llm_adapter_ prefix, and add llm_adapter to
default_components so activate and deactivate include it for anima
models while staying inert elsewhere via the existing getattr guards.
2026-04-25 03:16:03 +01:00
CalamitousFelicitousness 54704db0bc feat(anima): load custom transformer from unet dropdown
Anima community files bundle the llm_adapter inline alongside the
transformer, so CosmosTransformer3DModel.from_single_file mangles the
118 adapter keys via Cosmos 2.0 substring renames. New helper reads the
safetensors, strips the BFL-style prefix variants, partitions adapter
keys out, runs the rest through diffusers' converter, and loads each
half into its target. SDNQ and layerwise quantization honored; TRT and
GGUF skipped.
2026-04-24 23:36:27 +01:00
vladmandic 04b8056508 fix typo in ernie
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-16 10:41:10 +02:00
vladmandic d1fb1b47a8 ernie enable/disable built-in pe
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-16 07:48:09 +02:00
Vladimir Mandic c86ba31214 add nucleus-image
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-04-15 11:49:10 +00:00
Vladimir Mandic db8c6e9243 add ernie-image
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-04-15 11:06:32 +00:00
CalamitousFelicitousness 65e59e7224 feat(lora): z-image native lokr, loha and oft loaders
Add three adapter families to the z-image native loader and chain them
with the existing lora path through load_safetensors. Mixed-family
files (for example gta6_amateur_photography_zimagebase_v2.safetensors,
which carries lora and lokr groups in the same file) now load
completely instead of having one family silently dropped.

Shared helpers in pipelines/z_image/zimage_lora.py parse keys by
suffix list, rename legacy attention.out and attention.wo to
attention.to_out.0, and split fused attention.qkv into to_q/k/v. For
lora the split chunks the up weight along dim 0. For lokr the split
emits three NetworkModuleLokrChunk entries that share the tensors and
slice the kronecker product at apply time.

Fused attention.qkv for loha and oft is skipped with a warning. No
NetworkModuleHadaChunk exists, oft rotations are tied to out_features
and cannot be cleanly split across q/k/v, and no real z-image adapter
in that layout exists today.

load_safetensors for zimage chains try_load_lora, try_load_lokr,
try_load_loha and try_load_oft and merges their module dicts into a
single Network so mixed files load every module.
2026-04-14 21:48:19 +01:00
CalamitousFelicitousness c35adc4d0d feat(lora): native z-image lora loader
Add zimage to allow_native so lora_force_diffusers picks between
native and diffusers. Before this, zimage always took the diffusers
path regardless of the setting.

pipelines/z_image/zimage_lora.py reads the safetensors and writes
directly into network_layer_mapping, so Z-Image LoRAs no longer go
through the diffusers PEFT converter that raised KeyError on
state dicts with partial alpha keys.

Key formats handled: ai-toolkit, kohya lora_unet_, bare transformer.
and no-prefix. Pre-refactor fused attention.qkv is split into
to_q/k/v; attention.out and attention.wo are renamed to
attention.to_out.0. Alpha and dora_scale are preserved.
2026-04-14 21:13:23 +01:00
vladmandic 101bd64b8c update todo/changelog
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-14 14:05:32 +02:00
vladmandic 58649a7935 trivial prompt-to-json
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-14 13:59:56 +02:00
vladmandic 0a15030067 error checks for fibo
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-14 13:45:33 +02:00
vladmandic afd246d062 fix vibe installer
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-14 13:24:09 +02:00
vladmandic 6f471f9050 install vibe on-demand
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-14 13:20:12 +02:00
vladmandic 0a2462154c step1x
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-14 13:03:26 +02:00
vladmandic 020bc7a569 cleanup hijacks
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-14 12:52:51 +02:00
vladmandic 0b4deb80a4 cleanup
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-13 16:22:56 +02:00
vladmandic 7a6b0bdcc9 bria-fibo prompt-to-json
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-13 12:41:57 +02:00
vladmandic 84c2ddc5ca linting
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-13 12:18:05 +02:00
resonantsky 0c9e865641 Restructure FP16 clamp patch into pipelines/z_image/patch_fp16.py subpackage 2026-04-13 11:18:56 +02:00
resonantsky 407c54dc47 FP16 Clamp fix for Z-Image-Turbo, enable FP16 on ZiT. 2026-04-13 10:37:13 +02:00
vladmandic a00ea46114 add step1x-edit and vibe-edit
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-12 19:06:08 +02:00
vladmandic da01e6ced2 add lumina-dimoo
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-12 19:06:08 +02:00
vladmandic 5f659553a0 add bria-fibo
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-12 19:06:08 +02:00
vladmandic 4ef2c7ab3b fix check-models
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-12 19:06:08 +02:00
vladmandic b9a38b5955 ai-agents
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-12 18:54:22 +02:00
vladmandic 44cb2f6f9c improve path_to_repo
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-08 09:47:06 +02:00
vladmandic 9d0ecde462 add sdxs
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-02 20:15:30 +02:00
vladmandic 849ab8fe1e fix loader
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-30 09:58:42 +02:00
vladmandic b86e357b8e update nunchaku code
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-28 09:49:05 +01:00
awsr bec694a7d2 PEP 484 pipelines directory 2026-03-25 16:56:41 -07:00
vladmandic 0b74796d94 basic ty config
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-25 09:34:59 +01:00
CalamitousFelicitousness 18568db41c Add native LoRA loading for Flux2/Klein models
Load Flux2/Klein LoRAs as native NetworkModuleLora objects, bypassing
diffusers PEFT. Handles kohya (lora_unet_), AI toolkit (diffusion_model.),
diffusers PEFT (transformer.), and bare BFL key formats with automatic
QKV splitting for double block fused attention weights.

Includes shape validation to reject architecture-mismatched LoRAs early.
Respects lora_force_diffusers setting to fall back to PEFT when needed.
2026-03-25 04:24:49 +00:00
vladmandic 53839e464c remove legacy quant loaders
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-24 15:01:07 +01:00
vladmandic 09b9ae32c1 add color grading to processing
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-23 08:44:07 +01:00
CalamitousFelicitousness 9719290ceb fix(lora): handle kohya-format alpha keys in Flux2/Klein LoRA loading 2026-03-23 02:14:07 +00:00
CalamitousFelicitousness 091f31d4bf add Flux2/Klein LoRA support
- detect f2 model type for LoRAs via metadata, architecture, and filename/folder
- preprocess bare BFL-format keys with diffusion_model prefix for Flux2LoraLoaderMixin
- handle LoKR format via native NetworkModuleLokr with on-the-fly kron(w1, w2)
- add NetworkModuleLokrChunk for fused QKV split into separate Q/K/V modules
- activate native modules loaded via diffusers path
- improve error message for Flux1/Flux2 architecture mismatch
2026-03-23 02:14:07 +00:00
vladmandic 5ff73b61a4 add google gemini to captioning
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-02 09:34:40 +01:00
vladmandic 2da67ce7d3 cleanup and fix monitor
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-28 12:31:09 +01:00
vladmandic afff46f2ac add google-flash-3.1-image
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-27 10:53:22 +01:00
vladmandic 554c8fbf2f remove model: hdm
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-24 18:19:23 +01:00
Vladimir Mandic 87e4505acd Merge pull request #4658 from liutyi/dev
FireRed Edit preview image
2026-02-21 13:43:13 +01:00
Vladimir Mandic 9a63ec758a initial pyright lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-02-21 09:32:36 +01:00
Oleksandr Liutyi 316b940b6b Change Unipic3 CM to Unipic 3 base. Add unipic3 to autodetect patterns. Add preview image 2026-02-20 19:09:24 +00:00
Vladimir Mandic d65a2d1ebc ruff lint 2026-02-19 11:13:44 +01:00
Vladimir Mandic e5c494f999 cleanup logger 2026-02-19 11:09:13 +01:00
Vladimir Mandic a3074baf8b unified logger 2026-02-19 09:46:42 +01:00
Vladimir Mandic 6fdd3a53cf reduce mandatory requirements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-02-18 17:53:08 +01:00
vladmandic da1cf2f996 refactor image methods
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-11 12:29:00 +01:00
CalamitousFelicitousness 76aa949a26 refactor: integrate sharpfin for high-quality image resize
Vendor sharpfin library (Apache 2.0) and add centralized wrapper
module (images_sharpfin.py) replacing torchvision tensor/PIL
conversion and resize operations throughout the codebase.

- Add modules/sharpfin/ vendored library with MKS2021, Lanczos3,
  Mitchell, Catmull-Rom kernels and optional Triton sparse acceleration
- Add modules/images_sharpfin.py wrapper with to_tensor(), to_pil(),
  pil_to_tensor(), normalize(), resize(), resize_tensor()
- Add resize_quality and resize_linearize_srgb settings
- Add MKS2021 and Lanczos3 upscaler entries
- Replace torchvision.transforms.functional imports across 18 files
- to_pil() auto-detects HWC/BHWC layout, adds .round() before uint8
- Sparse Triton path falls back to dense GPU on compilation failure
- Mixed-axis resize splits into two single-axis scale() calls
- Masks and non-sRGB data always use linearize=False
2026-02-11 09:57:37 +01:00