Commit Graph

13342 Commits

Author SHA1 Message Date
Vladimir Mandic d2dddbc087 Merge pull request #4843 from liutyi/dev
HiDream O1 Image Reference images
2026-05-12 00:09:22 +02:00
Oleksandr Liutyi e6be4e0369 HiDream O1 Image Reference images 2026-05-11 20:18:29 +00:00
Vladimir Mandic 7641abca61 update changelog
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-11 09:54:25 +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
Vladimir Mandic 14a5647905 Merge pull request #4842 from vladmandic/fix/installer-ssh-update-check
fix(installer): support ssh remotes in repo update check
2026-05-11 06:22:16 +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
CalamitousFelicitousness e15bd607a1 fix(installer): support ssh remotes in repo update check
`get_version()` previously stored the raw `git remote get-url origin`
output in `ver['url']`. For ssh-form remotes (`git@host:owner/repo` or
`ssh://git@host/owner/repo`), the GitHub branches API url builder in
`check_version()`, which strips the `https://github.com/` prefix,
produced a malformed url that returned 404. The 404 response (a dict
with `message`) was then iterated by a list comprehension filtering on
`'name' in b`, yielding an empty branch list and a misleading
"branch=dev skipping update" warning.

- normalize ssh and ssh:// remotes to canonical https form in
  `get_version()`, so every consumer of `ver['url']` sees one shape
- guard `check_version()` against non-list api responses with an
  `isinstance` check that logs the actual payload instead of silently
  yielding `[]`
2026-05-10 22:01:02 +01:00
Vladimir Mandic 99ea7d8668 update changelog
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-10 21:52:21 +02: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 0d49cf0f7e docs(i18n): rename Replace underscores hint to Keep underscores
Cover both display and insertion; cross-reference from the Keep @ hint.
2026-05-10 19:59:22 +01: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 df15857a61 docs: add hint typography agent instructions 2026-05-10 19:06:46 +01:00
CalamitousFelicitousness 91d26b8a27 docs(i18n): apply typography conventions across hints 2026-05-10 18:44:56 +01:00
CalamitousFelicitousness 561d3f11da docs(i18n): refer to the tab as Images, not Control 2026-05-10 17:46:22 +01:00
CalamitousFelicitousness 7bd284fa31 docs(i18n): bold keys in bullet-list hints 2026-05-10 17:23:51 +01:00
CalamitousFelicitousness 0ba02e4cd1 docs(i18n): clarify denoising strength step-count behavior
Closes #4839
2026-05-10 16:50:45 +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 0eedbec88d fix kanvas outpaint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-10 11:53:34 +02: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 7214f677f2 test(flux2): canonical offline tests for native adapter loaders
36 tests across parsing primitives, family loaders, calc_updown shape
sanity, and the lora_apply ex_bias accumulation path. Builds a mock
Flux2-shaped transformer (HIDDEN=128, 2 double + 2 single blocks) and
writes synthesized state dicts to tempfile-managed safetensors so the
loaders' real read_state_dict path runs.

Loader fixtures include the full nine-family menu plus four prefix
variants (kohya, BFL/AI-toolkit, PEFT, bare-BFL) and the two real
ground-truth formats observed on Hugging Face: base_model.model.
(peft.save_pretrained wrapper) and lycoris_ (LyCORIS-standalone).
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 6359b2b5b4 feat(flux2): support base_model.model. and lycoris_ key prefixes
base_model.model. is the peft.save_pretrained wrapper; stripped
via _unwrap_peft_wrapper and re-parsed against the standard prefix
list (so the same code path handles whatever format peft wrapped).
lycoris_ is LyCORIS-standalone (e.g. SimpleTuner LoKR); base path
is an underscore-rendered diffusers path returned 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 434d6953cb feat(flux2): native Full loader
Loads diff (host-shape weight delta) and optional diff_b (bias delta).
Fused QKV is skipped: no NetworkModuleFullChunk exists.
2026-05-09 23:16:09 +01:00
CalamitousFelicitousness 2fc559d0bb feat(flux2): native Norm loader with loader-local layer-name stamping
Targets the elementwise-affine RMSNorms inside attention (norm_q,
norm_k, norm_added_q, norm_added_k). lora_convert.py:502 skips
network_layer_name on transformer norm modules outside SD3, so this
loader stamps it directly on the modules it binds — surgical, no
shared-code edit, no impact on modules a Norm adapter doesn't target.
2026-05-09 23:16:09 +01:00
CalamitousFelicitousness 5978716c98 feat(flux2): native GLoRA loader
Loads the four ab.weight tensors plus alpha. Fused QKV is skipped:
GLoRA's target-dependent term doesn't row-slice cleanly without
recomputing against a fused proxy weight.
2026-05-09 23:16:09 +01:00
CalamitousFelicitousness f57e7c39e2 feat(flux2): native IA3 loader
The .on_input marker disambiguates IA3 from other families that also
have .weight keys; the per-group gate insists on both. Fused QKV is
skipped with a warning.
2026-05-09 23:16:09 +01:00
CalamitousFelicitousness 877abbe406 feat(flux2): native OFT loader, skips fused-QKV with warning
Both kohya (oft_blocks + alpha-as-constraint) and LyCORIS (oft_diag)
layouts route through NetworkModuleOFT. Fused QKV in double_blocks is
skipped: the block-diagonal rotation's block_size = out_features /
num_blocks would need re-derivation per chunk to fit a Q/K/V split.
2026-05-09 23:16:09 +01:00
CalamitousFelicitousness b8af17ee1d feat(flux2): native LoHA loader with fused-QKV chunk support
Standard non-Tucker LoHAs route through NetworkModuleHadaChunk for
fused QKV in double_blocks. Tucker (CP-decomposed) variants on fused
targets are skipped with a warning. Single-block linear1 and non-QKV
double-block targets work for any LoHA layout.
2026-05-09 23:16:09 +01:00
CalamitousFelicitousness 63b61c0692 refactor(flux2): extract shared scaffolding for native adapter loaders
Adds per-family SUFFIX/MARKER tables and shared parse_key /
group_by_suffixes / resolve_targets helpers, mirroring the pattern
in pipelines/z_image/zimage_lora.py. try_load_lora and try_load_lokr
now share this scaffolding alongside the family loaders that follow.
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
CalamitousFelicitousness 4aca63e841 fix(lora): guard OFT constraint for LyCORIS oft_diag files
LyCORIS files have self.constraint=None (only the kohya path
uses it). Wrap the .to() call to avoid the NoneType AttributeError.
2026-05-09 22:04:17 +01:00
Vladimir Mandic e7e74a44a8 update changelog
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-09 17:54:25 +02:00
Vladimir Mandic fad9015270 fix vae preview flash previous image
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-09 17:09:55 +02:00