Commit Graph
59 Commits
Author SHA1 Message Date
hben35096 5f68ae0de7 Reorder execution providers in model initialization
When TensorRT libraries are missing, forcibly using the TensorRT Execution Provider can crash the entire ComfyUI Python process.
2026-09-18 09:07:50 +08:00
chflame163 c4a755fd57 Revert "Merge pull request #146 from billwen/claude/magical-feynman"
This reverts commit 706015a385, reversing
changes made to 2b020b7430.
2026-04-08 12:40:01 +08:00
Gang WenandClaude Opus 4.6 acbe51c5a2 Use BartTokenizerFast instead of AutoTokenizer to avoid config loading
AutoTokenizer tries to load the model config to detect tokenizer type,
which fails because transformers 5.x CONFIG_MAPPING doesn't know
florence2_language. Use BartTokenizerFast directly with tokenizer.json
fallback for models that use different tokenizer formats.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 20:03:24 +02:00
Gang WenandClaude Opus 4.6 1130a5f117 Fix tokenizer loading for models with incompatible added_tokens format
When AutoTokenizer fails (e.g. Florence-2-Flux-Large), fall back to
loading tokenizer.json directly via the tokenizers library and wrap
it with PreTrainedTokenizerFast, extracting special tokens from
tokenizer_config.json manually.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 20:01:28 +02:00
Gang WenandClaude Opus 4.6 aa016d91de Add slow tokenizer fallback for models with incompatible added_tokens
Some Florence2 variants (e.g. Florence-2-Flux-Large) have added_tokens
in a format that fast tokenizers in transformers 5.x cannot parse.
Fall back to slow tokenizer on TypeError.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 19:59:26 +02:00
Gang WenandClaude Opus 4.6 8d1bfd3874 Use AutoTokenizer instead of BartTokenizerFast for broader model support
Some Florence2 variants (e.g. Florence-2-Flux-Large) use a RoBERTa
tokenizer. AutoTokenizer auto-detects the correct tokenizer class.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 19:57:01 +02:00
Gang WenandClaude Opus 4.6 6b60e25cdc Add debug logging for pixel_values shape in run_example
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 19:31:12 +02:00
Gang WenandClaude Opus 4.6 21549b7bfe Fix florence2_models imports: add __init__.py and use relative imports
The florence2_models directory needs an __init__.py to be a proper
Python package, and imports from py/florence2_ultra.py need to use
relative imports (..florence2_models) since it's a sibling subpackage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 19:27:39 +02:00
Gang WenandClaude Opus 4.6 fd34c3d5d8 Add debug logging to Florence2 model loading path
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 08:20:03 +02:00
Gang WenandClaude Opus 4.6 810e34d859 Add transformers 5.x model loading path for Florence2
Uses local Florence2 modules with accelerate-based weight loading and
a custom Florence2Processor for transformers >= 5.0.0, while keeping
the existing loading path for older versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 08:15:29 +02:00
Gang Wen d55bd6acbb Revert "Fix Florence2 config compatibility with transformers 5.x"
This reverts commit 31ab0275de.
2026-04-06 21:34:45 +02:00
Gang WenandClaude Opus 4.6 31ab0275de Fix Florence2 config compatibility with transformers 5.x
In transformers 5.x, forced_bos_token_id was moved from PretrainedConfig
to GenerationConfig. Florence2's custom config accesses this attribute
during init, causing an AttributeError that prevents model loading and
leads to a NoneType crash when the processor is later called.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 21:26:57 +02:00
facok d91c938fdd fix BBoxJoin merging bboxes at image-index level instead of per-image
The old code used list.extend() on the outer (image-index) dimension,causing bboxes from different inputs to be treated as separate images rather than merged into the same image's bbox list.
2026-03-30 07:42:43 +08:00
Arthur R LongbottomandClaude Opus 4.6 2130085440 Fix GroundingDINO bertwarper for transformers 5.x + PyTorch 2.9+
transformers 5.x introduced two breaking changes that affect the
bundled GroundingDINO BertModelWarper:

1. `BertModel.get_head_mask()` was removed. Added a standalone
   `_get_head_mask()` fallback with a `hasattr` check so both
   transformers 4.x and 5.x work.

2. `BertModel.get_extended_attention_mask()` changed its 3rd
   positional argument from `device` to `dtype`. The old call-site
   passes a `torch.device`, which newer transformers interprets as
   `dtype=torch.device` → TypeError. Replaced with a standalone
   `_get_extended_attention_mask()` static method that also handles
   PyTorch 2.9's prohibition of `1.0 - bool_tensor` by explicitly
   casting to float32 first.

Fixes #140

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 10:55:47 -08:00
chflame163 f0fe35bd6d fix import issue on Transformers 5.x 2026-01-30 16:31:44 +08:00
chflame163 f16192bfa7 Ultra nodes support vitmatte-base-composition-1k 2026-01-30 14:31:25 +08:00
chflame163 c31de7030c MediapipeFacialSegment node support face_landmarker to compatible Python 3.12 and 3.13 2026-01-22 10:11:17 +08:00
chflame163 42f9dbae84 update imagefunc.py 2026-01-08 17:55:19 +08:00
chflame163 86cc56bbcf fix bug of converting BF16 tensor to pillow image 2025-12-29 15:52:17 +08:00
ihmily 67adbfdcae Fix mask broadcasting error for MediaPipe ≥0.10.30 2025-12-24 17:03:20 +08:00
chflame163 18435772d1 fix bug of Lama node 2025-12-11 21:28:45 +08:00
chflame163 1a1928f5ae fix florence can not run with high version of TRANSFROMERS 2025-12-11 20:09:10 +08:00
jmjoy 49895abbc7 Enhance YoloV8Detect node with additional parameters for detection configuration 2025-11-07 14:44:05 +08:00
chflame163 64c8317ab3 fix import bug of deepseek.py 2025-09-10 17:27:29 +08:00
Semon Xue c1e8dd7f7b Update Gemini models and fix inline_data check 2025-08-31 00:39:38 +08:00
chflame163 86db1ac8f2 add support GLM-4.5V model of ZhipuGLM4V node 2025-08-13 11:56:41 +08:00
chflame163 5f8c6f29c4 update ZhipuGLM4 node to support glm-4.5 series model 2025-08-10 18:42:24 +08:00
chflame163 d2093fe100 commit JimengI2I_API node 2025-08-09 20:50:26 +08:00
chflame163 0affa0ccac fix JoyCaptionBetaOne model CPU offload bug 2025-08-04 20:43:44 +08:00
chflame163 b5d2c94637 support JoyCaptionBetaOne model CPU offload 2025-06-28 10:35:58 +08:00
chflame163 0f9184100e commit SAM2UltraV2 and LoadSAM2Model nodes 2025-05-17 20:57:21 +08:00
chflame163 c7cb249330 commit JoyCaption2Split, LoadJoyCaption2Model and JoyCaption2ExtraOptions nodes 2025-05-15 21:31:43 +08:00
chflame163 9ed67eb919 commit SaveImagePlusV2 node 2025-05-14 20:02:35 +08:00
chflame163 7d599ea867 commit GeminiImageEdit,GeminiV2,ObjectDetectorGeminiV2 nodes 2025-04-04 19:50:36 +08:00
chflame163 725986d718 support numpy 2.x 2025-03-12 13:51:37 +08:00
chflame163 9252a061b1 commit DeepSeek API V2 node 2025-02-23 12:33:29 +08:00
chflame163 81412d350f commit Collage node 2025-02-13 13:41:27 +08:00
xuminglong 6d315e7dc1 add use_global_model for JoyCaption2.
Avoid the problem of multiple nodes loading each time when the model is the same and the problem of GPU memory release.
2025-01-23 19:57:54 +08:00
chflame163 2b53568983 fix bug of image_beauty 2025-01-15 22:48:20 +08:00
Mara Robin B. 1b8f5183c0 load sam_hq to cpu if cuda is unavailable
fixes RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
2025-01-05 07:42:14 +01:00
chflame163 b0336283f7 Merge branch 'main' of https://github.com/chflame163/ComfyUI_LayerStyle_Advance 2025-01-02 12:29:23 +08:00
chflame163 4db54ed047 commit DeepSeekAPI node 2025-01-02 12:28:56 +08:00
TK 83290932c8 structured json save workflow 2024-12-31 18:55:15 +02:00
chflame163 c7034112ee requirements.txt add zhipuai 2024-12-28 20:39:05 +08:00
chflame163 b17bfc5e2d commit ZhipuGLM4,ZhipuGLM4V,SegmentAnythingUltraV3,LoadSegmentAnythingModels nodes 2024-12-28 12:10:14 +08:00
chflame163 20db9ad2a8 commit ZhipuGLM4,ZhipuGLM4V,SegmentAnythingUltraV3,LoadSegmentAnythingModels nodes 2024-12-28 10:54:13 +08:00
chflame163 1b52c5d89b support for short format hexcolor strings of imagefunc.py 2024-12-20 14:29:25 +08:00
chflame163 2aac37ab8a update imagefunc.py 2024-12-19 19:18:21 +08:00
chflame163 c63bf607f9 fix bug of function mask_area 2024-12-17 21:02:35 +08:00
chflame163 dc38ccbea8 fix ObjectDetectorGemini return empty bbox 2024-12-17 19:33:22 +08:00