GLM-OCR-BF16-ComfyUI
Native single-image/crop text recognition with normalized and raw decoded-text outputs.
This is a converted model package for Jack Spooner’s ComfyUI fork, derived from zai-org/GLM-OCR. It is not a new fine-tune.
Required code
The integration modifies ComfyUI core; this is not a drop-in custom_nodes package.
- Model integration commit
- Implementation · Offline converter
- Development branch · Pinned compatible reference snapshot
9d9053c5e - Installation, node usage and acceptance details
For an existing ComfyUI installation, use the linked core changes and their prerequisites against a compatible base. The integration commit alone is not asserted to be an independently cherry-pickable patch. The pinned reference snapshot includes the required shared loaders, attention and memory changes. Follow the fork’s installation README and dependencies when reproducing that snapshot; update the application only while its queue is idle. Upstream ComfyUI is Comfy-Org/ComfyUI; its README describes the underlying node engine and model management.
Files and installation
Place glm_ocr_bf16.safetensors in ComfyUI/models/text_encoders/. The tokenizer and required inference configuration are embedded; original HF shards are not required at inference.
| File | Size |
|---|---|
glm_ocr_bf16.safetensors |
2.222 GB |
Manifest/provenance files record the conversion and source revisions. SHA256SUMS and FILES.json describe this release. Filenames and model folders matter. No original source snapshot needs to be converted again.
Usage
Select glm_ocr_bf16.safetensors in Load CLIP, type stable_diffusion for automatic model detection. Connect one Load Image to Generate Text. Prompt: Text Recognition:; sampling off, thinking off, default template true, max_length 512. Use raw_text (output index 4) to retain decoded recognition evidence. Process separate images in separate invocations.
Verification and limits
Bounded RTX 5090 recognition and lifecycle checks pass, but a tiny badge fails literal accuracy. The native processor pads and scales down oversized inputs without enlarging small crops. No calibrated confidence or word polygons. Formula/table quality is unverified. Audio, video, history, reasoning and MTP are outside this integration.
These statements describe the linked retained tests, not a new cross-platform acceptance suite. File size is not a minimum RAM/VRAM requirement. No inference-time downloads or external inference worker are required by these native model paths.
Conversion and provenance
Maps native weights and embeds the tokenizer; intentionally omits the 16-tensor MTP layer. Ordinary autoregressive recognition uses layers 0–15. BF16 precision is retained.
Source model revision: 2e85a62840ccac27daa451df36c736c4636b8628. See PROVENANCE.json, the conversion manifest and NOTICE. No training data, private inputs or generated user recordings are included.
License and attribution
The official Hugging Face model card explicitly licenses the WEIGHTS under MIT. The separate GLM-OCR SDK code is Apache-2.0; its license is retained separately for clarity. This package contains the recognizer, not the upstream PP-DocLayoutV3 pipeline.
See LICENSE, NOTICE, and the retained upstream model card/source notices. Model authors and publishers retain credit; this is a third-party ComfyUI repackaging and does not imply endorsement. The weights’ terms and the separately linked ComfyUI code license are distinct.
Model tree for spoonn/GLM-OCR-BF16-ComfyUI
Base model
zai-org/GLM-OCR