219 Commits
Author SHA1 Message Date
City c09b4b799b Update pyproject.toml
ComfyUI Registry publish / ComfyUI Registry publish (push) Failing after 4m33s
2026-01-12 14:02:13 +01:00
City 923d1d162d Merge branch 'main' into stable 2026-01-12 13:58:56 +01:00
City 6ea2651e7d Only include metadata on new comfy versions
For #407 since old comfy versions don't support passing metadata (added in #399 )
2026-01-12 13:55:28 +01:00
City 9ecc3c48e7 Add Gemma3 12B Support (#402)
* Add Gemma3 12B Support

* Update loader.py

* Support tokenizer recreation from metadata

* Update loader.py

* update loader.py
2026-01-12 13:38:42 +01:00
jayn7 2e7f529b29 update loader.py 2026-01-12 07:09:08 +07:00
hpr 243a525df9 Update loader.py 2026-01-12 06:23:00 +07:00
jayn7 36b16deb09 Support tokenizer recreation from metadata 2026-01-12 06:19:49 +07:00
hpr 5a537ab64e Update loader.py 2026-01-12 06:19:44 +07:00
jayn7 a4c94821cb Add Gemma3 12B Support 2026-01-12 06:17:14 +07:00
Adam Niederer c2e3b0adc3 Accept size-one ndarrays of any dimension from gguf reader (#394)
Sometimes gguf will return size-one one-dimensional memmaps for scalar values. I'm not exactly sure when or why, but this will accept any dimension as long as it only contains one value

Resolves #384
2026-01-11 19:47:18 +01:00
Vantage with AIandCity 58625e1cb6 Added support to load model config from Metadata. (#399)
* Implement GGUF metadata extraction function

Added function to extract metadata from GGUF files.

* Updated the GGUF model loading and patching classes to include metadata handling.

* Clean up return logic for extra metadata

This should be more future proof in case we need to return other attributes in the future. Possible breaking change for anyone using `gguf_sd_loader` directly either way, though.

---------

Co-authored-by: City <125218114+city96@users.noreply.github.com>
2026-01-11 19:30:59 +01:00
City 795e45156e Use int64 for index in dequant
This is the fix provided by @LSXAxeller in #385
2025-12-18 09:11:56 +01:00
City 8493db6481 Limit this fix to BF16 2025-12-18 09:03:26 +01:00
City 1b254b246a Merge branch 'main' into stable 2025-12-17 16:01:44 +01:00
City a57094a3d3 Fix for scales being in BF16
The main conversion code shouldn't allow this, but apparently some models still end up with quantized 1D tensors, see #383
2025-12-17 15:52:16 +01:00
City 01f8845bf3 Add VL version of Qwen3 4B as valid arch
According to #361 the thinking/abliterated versions work even though the model wasn't trained with them, maybe the vision one does too.
Does not have mmproj support, since nothing uses that atm.
2025-12-01 01:48:19 +01:00
City c5c11dd511 Add VL version of Qwen3 4B as valid arch
According to #361 the thinking/abliterated versions work even though the model wasn't trained with them, maybe the vision one does too.
Does not have mmproj support, since nothing uses that atm.
2025-12-01 01:32:43 +01:00
City 47a78ff7d8 Update pyproject.toml 2025-11-29 22:40:55 +01:00
City f2b2066dec Merge branch 'main' into stable 2025-11-29 22:35:07 +01:00
City 79379af338 Add tokenizer convert logic for Mistral
#367
2025-11-29 22:21:30 +01:00
City 0c9edef33b Improve invalid tenc file message 2025-11-29 22:20:13 +01:00
City bff07287ab Update pyproject.toml 2025-11-27 22:31:18 +01:00
City 3e66bcb77a Merge branch 'main' into stable 2025-11-27 22:30:46 +01:00
City d3e14efda6 Hotfix for fallback
#369
2025-11-27 06:25:54 +01:00
City 6aa9866ef3 Add IQ4_NL and IQ4_XS support
Based on the reference numpy code in gguf-py.
Mostly useful for tenc, since main model won't have imatrix for quantizing.
2025-11-27 05:17:04 +01:00
City ad82d2dc60 Update pyproject.toml 2025-11-27 00:03:25 +01:00
City f57847df85 Merge branch 'main' into stable 2025-11-27 00:03:09 +01:00
City fa48477de8 Qwen3-4B support for Z-Image
for #368
2025-11-26 23:22:52 +01:00
City d5ec55ee6f Update pyproject.toml 2025-11-07 23:33:47 +01:00
City ee344c98fc Merge branch 'main' into stable 2025-11-07 23:33:11 +01:00
rattus 02dac863ee add default named_modules_to_munmap variable (#357)
* add default named_modules_to_munmap variable

Default this to handle to case of cloning a GGUFModelPatcher which then
expects it to exist on the clone.

I could never reproduce this condition, however 4 users have the error.
This error path is very sensitive to VRAM condtions and workflow and I
never got the details so its a bit of a guess.

But from a code point of view, its the right thing anyway

* nodes: carry the mmap_released state through a clone()

There are workflows where the same underlying model will be loaded
twice by two different ModelPatchers.

With the current code as-is, the first patcher will load fine and
intercept the pins while removing already done pins from the free
modules list.

It then will load again with the second MP however, this one will
not get the callbacks for the already pinned stuff and then rip
through and .to().to() them all. This destroys the pinning setup
while comfy core still keeps the modules registered as unpinned.
This causes a crash on einval when core goes to unpin the not pinned
tensors.

Comfy core now has a guard against unpinning the not-pinned, however
what I think is happening, is the RAM of the pin in freed in the
.to().to() and then malloc re-allocates it to new tensors with cuda
keeping its records of previous pinning. einval can happen when
you try and unpin a tensor in the middle of the block which is
definately possible on this use after free pattern.
2025-11-07 23:31:20 +01:00
City d4fbdb0139 Add type string for older mmproj files 2025-11-04 07:04:11 +01:00
City 776e5b56e5 Update pyproject.toml 2025-11-03 15:59:14 +01:00
City ca582bcb6d Merge branch 'main' into stable 2025-11-03 15:58:26 +01:00
rattus 100c06cda8 nodes: mmap detach weights before they are pinned (#355)
Comfy core recently introduced a feature where weights may be pinned
when loading, particularly for the case of offloading.

Intercept this, and immediately detached each weight before the pinning.
This avoids a crash that at least some users are experiencing.

Use a little dict on the modules to keep track of whats already done,
and when the catch-all detacher loop comes through, use this dict
(which has already done modules removed) as the iterator basis.
2025-11-03 15:57:29 +01:00
blepping be2a08330d Fix dequant_dtype handling (#334)
* Fix dequant_dtype handling

* Simplify dequant dtype selection expression
2025-09-14 23:10:50 +02:00
blepping 6b778afdc9 Fix attempt to create a tensor with dtype "target" (#330)
* Fix attempt to create a tensor with dtype "target"

* Check if dequant_dtype is None before string comparison with target
2025-09-09 07:07:45 +02:00
City 10606d77d0 Update pyproject.toml 2025-08-20 01:36:07 +02:00
City 5a8de41066 Merge branch 'main' into stable 2025-08-20 01:35:39 +02:00
City d247022e3f Better mmproj detection logic
#317
2025-08-20 00:51:28 +02:00
City 0ca2aeb797 Qwen2-VL vision support
#317
2025-08-19 17:50:55 +02:00
City df44c9d8dc Update pyproject.toml 2025-08-05 15:36:53 +02:00
City bdb8f62fde Merge branch 'main' into stable 2025-08-05 15:36:32 +02:00
City cf0573351a Qwen2-VL text model support 2025-08-05 15:34:19 +02:00
City ad34e98355 Update pyproject.toml 2025-08-05 14:31:01 +02:00
City bf846d54a8 Merge branch 'main' into stable 2025-08-05 14:30:37 +02:00
City 79ba1d4b17 Qwen image arch string 2025-08-05 12:44:57 +02:00
sfinktah f1377afd9b Updated quantizing tool guide to compile with Visual Studio 2022 (#288) 2025-08-05 12:44:09 +02:00
spawner b1350f6f5a Merge pull request #304 from spawner1145/main
support lumina-image-2.0
2025-08-05 12:42:40 +02:00
City c51a948233 Update pyproject.toml 2025-06-15 01:02:28 +02:00