From ef4aaa5dc47a8e1a816552ab4d46204bd1c5734d Mon Sep 17 00:00:00 2001 From: "async () = process.env.GIT_USERNAME || (await ghUser()).email && (await ghUser()).name || DIE(\"Missing env.GIT_USERNAME\")" Date: Sat, 22 Nov 2025 01:23:42 +0000 Subject: [PATCH] chore(pyproject): Add pyproject.toml for Custom Node Registry --- pyproject.toml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1175d5c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,37 @@ +[project] +name = "pdf-tools" +description = "Advanced PDF processing, OCR, Image and text parsing, smart image crop nodes for ComfyUI. Features include multi-language OCR (Surya, PaddleOCR VL), AI vision analysis (Florence-2, LayoutLMv3), advanced PDF extraction with quality assessment, spread detection for scanned books, and comprehensive layout analysis. Supports 90+ languages with multiple output formats." +version = "1.0.0" +license = {file = "LICENSE"} +# classifiers = [ +# # For OS-independent nodes (works on all operating systems) +# "Operating System :: OS Independent", +# +# # OR for OS-specific nodes, specify the supported systems: +# "Operating System :: Microsoft :: Windows", # Windows specific +# "Operating System :: POSIX :: Linux", # Linux specific +# "Operating System :: MacOS", # macOS specific +# +# # GPU Accelerator support. Pick the ones that are supported by your extension. +# "Environment :: GPU :: NVIDIA CUDA", # NVIDIA CUDA support +# "Environment :: GPU :: AMD ROCm", # AMD ROCm support +# "Environment :: GPU :: Intel Arc", # Intel Arc support +# "Environment :: NPU :: Huawei Ascend", # Huawei Ascend support +# "Environment :: GPU :: Apple Metal", # Apple Metal support +# ] + +dependencies = ["# PDF Tools ComfyUI Custom Node - Requirements", "# For ComfyUI installation at: A:\\Comfy25\\ComfyUI_windows_portable\\python_embeded", "# ============================================================================", "# CORE DEPENDENCIES (Required for basic functionality)", "# ============================================================================", "# Image Processing", "Pillow>=10.0.0", "numpy>=1.24.0", "opencv-python>=4.8.0", "# PyTorch (should already be installed with ComfyUI)", "# torch>=2.0.0", "# torchvision>=0.15.0", "# ============================================================================", "# PDF PROCESSING (For PDF extraction nodes)", "# ============================================================================", "PyMuPDF>=1.23.0 # fitz - Main PDF library", "PyPDF2>=3.0.0 # Alternative PDF library", "# ============================================================================", "# AI/ML MODELS (For Florence2, SAM2, Layout analysis)", "# ============================================================================", "# Transformers and Hugging Face", "transformers>=4.35.0", "safetensors>=0.4.0", "accelerate>=0.24.0", "sentencepiece>=0.1.99 # Required for some transformers models", "# Computer Vision models", "timm>=0.9.0 # PyTorch Image Models - required by Florence2", "# Optional: Surya OCR (commented out - only install if needed)", "# surya-ocr>=0.4.0", "# ============================================================================", "# DOWNLOADER NODES (gallery-dl and yt-dlp)", "# ============================================================================", "# Gallery-dl for downloading from various websites", "gallery-dl>=1.26.0", "# Yt-dlp for video/audio downloading", "yt-dlp>=2023.12.0", "# Browser cookie support (for authentication)", "browser-cookie3>=0.19.0", "# ============================================================================", "# OCR LIBRARIES (Optional - for enhanced text recognition)", "# ============================================================================", "# Tesseract OCR wrapper (requires Tesseract binary installed separately)", "# pytesseract>=0.3.10", "# PaddleOCR (commented out - large dependency)", "# paddleocr>=2.7.0", "# EasyOCR (commented out - large dependency)", "# easyocr>=1.7.0", "# ============================================================================", "# UTILITY LIBRARIES", "# ============================================================================", "# HTTP requests and web scraping", "requests>=2.31.0", "urllib3>=2.0.0", "# Data validation and parsing", "jsonschema>=4.19.0", "# Progress bars and CLI formatting", "tqdm>=4.66.0", "colorama>=0.4.6 # For colored terminal output", "# ============================================================================", "# OPTIONAL DEPENDENCIES", "# ============================================================================", "# PDF to image conversion (requires poppler binary)", "# pdf2image>=1.16.0", "# Advanced image processing", "# einops>=0.7.0 # Used in some vision transformers", "# Layout analysis (commented out - may conflict with transformers versions)", "# layoutparser>=0.3.4", "# SAM2 (Segment Anything Model 2) - Install from source if needed", "# Installation: pip install git+https://github.com/facebookresearch/segment-anything-2.git", "# ============================================================================", "# NOTES", "# ============================================================================", "# 1. Make sure you're using the correct Python environment:", "# A:\\Comfy25\\ComfyUI_windows_portable\\python_embeded", "#", "# 2. To install all requirements:", "# python_embeded\\python.exe -m pip install -r requirements.txt", "#", "# 3. Some packages require additional system dependencies:", "# - PyMuPDF: No additional dependencies", "# - Tesseract OCR: Download from https://github.com/UB-Mannheim/tesseract/wiki", "# - Poppler (for pdf2image): Download from https://github.com/oschwartz10612/poppler-windows", "#", "# 4. GPU-specific packages:", "# - Ensure torch is CUDA-enabled for GPU acceleration", "# - Check: python -c \"import torch; print(torch.cuda.is_available())\"", "#", "# 5. For browser cookies to work with Chrome, you may need to:", "# - Run ComfyUI with administrator privileges (Windows)", "# - Or use Firefox which doesn't require admin access", "#", "# 6. Optional heavy dependencies (not included by default):", "# - Surya OCR: Advanced OCR system (~1GB models)", "# - PaddleOCR: Chinese + English OCR (~500MB models)", "# - EasyOCR: Multi-language OCR (~1GB models)", "# - SAM2: Segment Anything Model 2 (large model files)", "#", "# 7. Model downloads:", "# - Florence2 models: Downloaded automatically to ComfyUI/models/LLM/", "# - SAM2 models: Downloaded automatically to ComfyUI/models/sams/", "# - Transformers cache: Usually in user home directory/.cache/huggingface/"] + +[project.urls] +Repository = "https://github.com/EricRollei/PDF-Tools" +# Used by Comfy Registry https://registry.comfy.org +Documentation = "https://github.com/EricRollei/PDF-Tools/wiki" +"Bug Tracker" = "https://github.com/EricRollei/PDF-Tools/issues" + +[tool.comfy] +PublisherId = "" +DisplayName = "PDF-Tools" +Icon = "" +includes = [] +# "requires-comfyui" = ">=1.0.0" # ComfyUI version compatibility +