{"id":46305042,"url":"https://github.com/Dangocan/comfyui_glm_ocr","last_synced_at":"2026-03-18T07:00:57.769Z","repository":{"id":341509709,"uuid":"1170389010","full_name":"Dangocan/comfyui_glm_ocr","owner":"Dangocan","description":"ComfyUI custom node to run GLM-OCR locally — text, formula, and table recognition from images","archived":false,"fork":false,"pushed_at":"2026-03-02T04:28:33.000Z","size":180,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-02T09:13:47.296Z","etag":null,"topics":["comfyui","comfyui-node","computer-vision","document-understanding","glm-ocr","huggingface","ocr","transformers"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dangocan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-02T04:12:39.000Z","updated_at":"2026-03-02T04:28:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Dangocan/comfyui_glm_ocr","commit_stats":null,"previous_names":["dangocan/comfyui_glm_ocr"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Dangocan/comfyui_glm_ocr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dangocan%2Fcomfyui_glm_ocr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dangocan%2Fcomfyui_glm_ocr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dangocan%2Fcomfyui_glm_ocr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dangocan%2Fcomfyui_glm_ocr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dangocan","download_url":"https://codeload.github.com/Dangocan/comfyui_glm_ocr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dangocan%2Fcomfyui_glm_ocr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30654905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-18T02:48:56.676Z","status":"ssl_error","status_checked_at":"2026-03-18T02:48:55.747Z","response_time":104,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui","comfyui-node","computer-vision","document-understanding","glm-ocr","huggingface","ocr","transformers"],"created_at":"2026-03-04T12:00:38.868Z","updated_at":"2026-03-18T07:00:57.743Z","avatar_url":"https://github.com/Dangocan.png","language":"Python","funding_links":[],"categories":["Workflows created in 7 days"],"sub_categories":[],"readme":"# comfyui_glm_ocr\n\nComfyUI custom node to run [GLM-OCR](https://huggingface.co/zai-org/GLM-OCR) locally. Loads the model straight from your ComfyUI models folder — no Ollama, no API calls.\n\n![nodes](https://raw.githubusercontent.com/Dangocan/comfyui_glm_ocr/refs/heads/main/assets/nodes_preview.png)\n\n---\n\n## What it does\n\nGLM-OCR is a 0.9B vision-language model built for document understanding. You give it an image and a task prompt, it gives you text back. Works well on:\n\n- Scanned documents and photos of text\n- Tables (outputs markdown)\n- Math formulas (outputs LaTeX)\n- General image description\n\n---\n\n## Nodes\n\n### GLM-OCR Model Loader\n\nScans every checkpoint directory ComfyUI knows about (including paths from `extra_model_paths.yaml`) and lists any subfolder that contains a `config.json`. Select your model from the dropdown — no hardcoded paths.\n\n### GLM-OCR Run\n\nTakes the loaded model + an image and runs inference.\n\n| Input | Description |\n|-------|-------------|\n| `glm_ocr_model` | from the loader node |\n| `image` | any ComfyUI IMAGE |\n| `task_prompt` | preset task — see table below |\n| `max_new_tokens` | max output length (default 2048) |\n| `custom_prompt` | leave empty to use `task_prompt`, or type anything |\n\n| Task Prompt | Use |\n|-------------|-----|\n| `Text Recognition:` | extract all text from the image |\n| `Formula Recognition:` | extract math as LaTeX |\n| `Table Recognition:` | extract tables as markdown |\n| `Describe the image.` | general description |\n\nOutput is a `STRING` — connect it to `ShowText` or any other text node.\n\n---\n\n## Installation\n\n### 1. Install the node\n\nClone into your `ComfyUI/custom_nodes/` folder:\n\n```bash\ncd ComfyUI/custom_nodes\ngit clone https://github.com/Dangocan/comfyui_glm_ocr\n```\n\nOr use ComfyUI Manager → Install via Git URL → paste the repo URL.\n\n### 2. Download GLM-OCR\n\nPut the model in any checkpoint directory ComfyUI knows about. Example:\n\n```\nComfyUI/models/checkpoints/GLM-OCR/\n```\n\nThe folder needs to contain `config.json`, `model.safetensors`, and the tokenizer files. Download with:\n\n```bash\nhuggingface-cli download zai-org/GLM-OCR --local-dir ComfyUI/models/checkpoints/GLM-OCR\n```\n\nOr download manually from https://huggingface.co/zai-org/GLM-OCR/tree/main\n\n### 3. Check your transformers version\n\nGLM-OCR requires `transformers \u003e= 5.3.0`. Run this to check:\n\n```bash\npython -c \"import transformers; print(transformers.__version__)\"\n```\n\nIf it's below `5.3.0` or you get an error about `glm_ocr` architecture not being recognized, install from source:\n\n```bash\npip install git+https://github.com/huggingface/transformers.git\n```\n\n### 4. Restart ComfyUI\n\nThe nodes show up under the **GLM-OCR** category.\n\n---\n\n## Extra model paths\n\nIf your models are on a separate drive, add it to `extra_model_paths.yaml` in your ComfyUI root:\n\n```yaml\ncomfyui:\n    base_path: D:/MyModels/\n    checkpoints: checkpoints/\n```\n\nThe loader node picks up any registered checkpoint path automatically.\n\n---\n\n## Requirements\n\n- ComfyUI\n- Python 3.10+\n- PyTorch (CUDA recommended)\n- `transformers \u003e= 5.3.0` (install from git — see above)\n- `Pillow`\n\n---\n\n## Model\n\n**zai-org/GLM-OCR** — https://huggingface.co/zai-org/GLM-OCR\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDangocan%2Fcomfyui_glm_ocr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDangocan%2Fcomfyui_glm_ocr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDangocan%2Fcomfyui_glm_ocr/lists"}