Commit Graph

8575 Commits

Author SHA1 Message Date
Vladimir Mandic dd796552db use snapshot path for downloaded model
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-17 09:14:50 +02:00
Vladimir Mandic 68f00d85ca attention execution guard against cpu tensors
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-17 08:44:29 +02:00
Vladimir Mandic d8433e53cd fix custom vae loader
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-17 08:37:13 +02:00
Disty0 297ab4bb60 SDNQ Lora fix dtype 2026-05-16 13:13:41 +03:00
Vladimir Mandic f67562b912 - all guidance values set to -1 to enable using model defaults
- log default values used if not overriden by user
- rename inconsistent guidance variables:

p.cfg_scale
p.image_cfg_scale -> p.cfg_image
p.diffusers_guidance_rescale -> p.cfg_rescale
p.pag_scale -> p.cfg_true
p.pag_adaptive -> p.cfg_adaptive

Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-16 11:06:23 +02:00
Vladimir Mandic 632032308d add pruna placeholders
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-16 09:18:39 +02:00
Vladimir Mandic 7786b5de7d fix GHSA
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-16 08:53:54 +02:00
Vladimir Mandic ce726bf084 pil patches
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-16 08:32:45 +02:00
Vladimir Mandic 15de3307c6 Merge pull request #4847 from awsr/pillow-update
Update Pillow support to 12.2.0
2026-05-16 08:29:37 +02:00
Vladimir Mandic 4db62cc771 update xet and patch qk_norm defaults
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-16 08:27:11 +02:00
Vladimir Mandic 84cbc37659 gradio temp files guard
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-16 07:19:52 +02:00
Disty0 8e11971572 Fix SDNQ Lora 2026-05-15 21:25:08 +03:00
Disty0 58891d3a4e cleanup comments 2026-05-15 14:36:03 +03:00
Vladimir Mandic 8ca0568bd2 fix apply_sdnq_to_module
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-15 12:17:01 +02:00
Disty0 6eebf2566d Refactor SDNQ quantizer handling and add modules_to_not_use_matmul 2026-05-15 05:47:32 +03:00
Vladimir Mandic 8bf7ddffe3 caption: add image analyze
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-14 13:16:26 +02:00
awsr 82886ba9a3 Update Pillow support to 12.2.0
- Update "constraints.txt" and "requirements.txt".
- Migrate removed `ImageCms.FLAGS` to `ImageCms.Flags` enum.
- Update typing.
- Simplify getting path in `apply_srgb`.
2026-05-13 18:37:12 -07:00
Vladimir Mandic 10b6409954 skill check-models
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-13 11:47:33 +02:00
Vladimir Mandic 5630c91ac6 skill check-processing
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-13 11:47:11 +02:00
Vladimir Mandic 42c1199469 skill check-process
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-13 11:44:58 +02:00
Vladimir Mandic 22a8af0c89 skill check-api
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-13 11:44:32 +02:00
Vladimir Mandic 217e4e42c3 skill check-schedulers
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-13 11:40:48 +02:00
Vladimir Mandic 7194b4b553 add anima and hidream-o1 prequants
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-13 10:15:37 +02:00
Vladimir Mandic e368472cbb add scale_noise and improve set_timesteps to multiple schedulers
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-13 09:46:39 +02:00
Vladimir Mandic 1b927bac8d error handle missing image
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-12 09:19:54 +02:00
Vladimir Mandic d5f4199253 fix preview
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-11 09:48:22 +02:00
Vladimir Mandic 62a3653b49 ty lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-11 09:34:17 +02:00
Vladimir Mandic 6c2a56ff71 more pylint fixes
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-11 08:57:16 +02:00
Vladimir Mandic feeafc6286 strict ruff without exclude
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-11 08:36:49 +02:00
Vladimir Mandic c8d6fd5cf8 Revert "much stricter ruff linting"
This reverts commit 310dbf1574.
2026-05-11 08:13:57 +02:00
Vladimir Mandic 8296d07ff8 Revert "stricter pylint"
This reverts commit c27481e45a.
2026-05-11 08:13:48 +02:00
Vladimir Mandic c27481e45a stricter pylint
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-11 07:51:47 +02:00
Vladimir Mandic 310dbf1574 much stricter ruff linting
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-11 07:15:37 +02:00
CalamitousFelicitousness 543fd35484 feat(hidream): enable sdnq quantization for o1
- Add module_skip_keys entry for HiDreamO1Qwen3VLTransformer so SDNQ
  leaves embedding/output layers (lm_head, embed_tokens, x_embedder,
  t_embedder1, final_layer2, patch_embed, pos_embed) at full precision.
- Flip allow_quant to True in load_hidream_o1 and surface the resolved
  quant type in the load log.
2026-05-11 03:57:58 +01:00
Vladimir Mandic 0cb316272b Merge pull request #4841 from vladmandic/feat/flux2-native-adapters
Feat/flux2 native adapters
2026-05-10 21:49:45 +02:00
Vladimir Mandic e11a0f1980 Merge pull request #4840 from vladmandic/feat/civitai-embed-preview-meta
Feat/civitai embed preview meta
2026-05-10 21:48:35 +02:00
Vladimir Mandic 7ee740e744 add hidream-o1
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-10 21:45:58 +02:00
CalamitousFelicitousness f2227d7785 feat(autocomplete): apply keep-underscores setting to insertion
Rename `autocomplete_replace_underscores` to `autocomplete_keep_underscores`
(default false) so both autocomplete toggles read as "keep" semantics.
`insertTag` now honors the setting for both tag and artist modes, matching
the dropdown display. Embedding insertion always preserves underscores
because the names are filesystem identifiers.

- ui_definitions: rename option, flip default, update label
- scripts/autocomplete: rename handler, checkbox, and config-bridge keys
- javascript/autocomplete: invert render polarity; insertTag takes a `kind`
  parameter; drop the artist-mode hardcoded underscore replacement so the
  setting controls tags and artists uniformly

Closes #4827
2026-05-10 19:47:54 +01:00
CalamitousFelicitousness 0c44b93b25 refactor(flux2): expose single try_load entry point for dispatcher
Move the family-iteration loop into pipelines/flux/flux2_lora.try_load
so the f2 branch in lora_load.load_safetensors becomes a one-line call.

Per-family try_load_* entry points stay public for direct testing.

Addresses review feedback on PR #4841.
2026-05-10 16:33:18 +01:00
Vladimir Mandic 0fe34c47cf fix ipadapters and improve offloading
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-10 10:42:33 +02:00
Vladimir Mandic 02a403eba9 fix torch.compile
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-10 08:55:44 +02:00
CalamitousFelicitousness c32e90d08b fix(civitai): backfill gate and end-to-end thumb propagation
Gate finds the on-disk preview via resolve_preview_file and a
non-empty UserComment check so previews lacking embedded params enter
the worker. embed_preview_parameters writes via temp + os.replace,
converts RGBA to RGB before JPEG save, removes unreadable sources, and
invalidates any co-located .thumb.jpg. get_exif decodes EXIF
UserComment so regenerated thumbs propagate the source's params. For
.mp4 and .webm previews, embed targets the .thumb.jpg frame extracted
by save_video_frame instead of the unembeddable video file.
backfill_preview_parameters and resolve_preview_file share
find_ui_preview_file, which mirrors find_preview's iteration order so
backfill embeds into the file the modernUI actually surfaces (handles
LoRAs with multiple coexisting variants like .jpg + .jpeg).
civitai_meta_to_parameters drops generator-specific noise keys (comfy,
comfyui, workflow, extraMetadata) and applies a 512-char cap on
pass-through values to keep the embedded chunk compact.
2026-05-10 06:12:13 +01:00
CalamitousFelicitousness ba1080fea2 feat(civitai): backfill preview meta on rescan
When download_civit_preview short-circuits at 304 (file exists), the
rescan path now falls back to backfill_preview_parameters: checks
whether the file already carries an embedded parameters chunk and, if
not, embeds img.meta in place. Existing libraries get retroactive
metadata via the existing "Search metadata" rescan, no model
re-download required.
2026-05-10 03:30:10 +01:00
CalamitousFelicitousness 4c2022dfdf feat(civitai): embed preview meta into downloaded images
Civitai's CDN strips PNG tEXt/EXIF chunks during delivery, leaving the
modernUI Preview metadata tab empty for downloaded networks. Format the
version API's images[].meta into sdnext's standard parameters channel
(PNG tEXt / JPEG-WEBP EXIF UserComment) so read_info_from_image picks
it up through the existing path. Embedding is wrapped in try/except
and never blocks the download.
2026-05-10 03:20:03 +01:00
CalamitousFelicitousness 69506551a7 feat(lora): surface method-selection reason in load logs
get_method now returns (method, reason). The reason distinguishes
user opt-in (lora_force_diffusers), class-forced, hash-forced, and
arch-unsupported routes from the default native path; surfaced in
the info-level "Network load: type=LoRA load=<method>(<reason>)"
line so users can tell why a given load took a particular path.
2026-05-10 00:05:37 +01:00
CalamitousFelicitousness dda7bb7bbc feat(flux2): native BOFT (butterfly-OFT) support
Discriminated from OFT by 4-D oft_blocks shape (boft_m, block_num,
block_size, block_size), mirroring LyCORIS algo_check. The cascade
of log_2(block_num)+1 Cayley rotations is applied via the
unflatten/transpose/flatten reshape sequence in NetworkModuleBOFT,
porting LyCORIS make_weight verbatim.
2026-05-10 00:05:37 +01:00
CalamitousFelicitousness 4d3699bab6 refactor(flux2): align dispatcher with z-image/chroma native pattern
Adds 'f2' to allow_native and dispatches all eight native loaders
through load_safetensors. lora_force_diffusers continues to route
through lora_diffusers.load_diffusers as the explicit PEFT escape
hatch.
2026-05-09 23:16:09 +01:00
CalamitousFelicitousness 7983c8ec72 feat(lora): add NetworkModuleHadaChunk for fused-weight LoHA targets
Slices w1a/w2a at the assigned chunk's row range and computes the
partial Hadamard product, mirroring NetworkModuleLokrChunk. Used
when LoHA targets a fused weight (e.g. img_attn.qkv) on models
that expose split Q/K/V modules.
2026-05-09 23:16:09 +01:00
CalamitousFelicitousness 1750a2881e fix(lora): use is-not-none check for ex_bias accumulation
Truthiness on a tensor raises when stacking multiple Norm/Full
adapters. Match the updown accumulation pattern five lines above.
2026-05-09 22:04:42 +01:00
CalamitousFelicitousness db4a345a1b fix(lora): set GLora dim so alpha scaling is applied
Without self.dim, NetworkModule.calc_scale returns 1.0 even when
alpha is present, silently dropping the trained scaling. Use
w1b.shape[0] as the rank, matching the network_lora and
network_hada conventions.
2026-05-09 22:04:42 +01:00