This is a comprehensive ComfyUI custom node package that provides powerful tools for:
- PDF Extraction & Processing - Extract images and text from PDFs
- Media Downloading - Download images/videos from Instagram, Reddit, Twitter, YouTube, etc.
- AI-Powered Image Analysis - Florence2 vision models for rectangle detection
- Layout Analysis - Detect document layouts and structures
- Image Enhancement - Modern image enhancement for better quality
Download media from 100+ websites including:
- Instagram (posts, stories, reels)
- Reddit (posts, galleries)
- Twitter/X (images, videos)
- Imgur, DeviantArt, Artstation, and more
Features:
- Browser cookie authentication
- File organization by type (images/videos/audio)
- Download archive to avoid duplicates
- Metadata extraction
Download videos and audio from:
- YouTube (videos, playlists, channels)
- TikTok, Twitch, Instagram videos
- 1000+ video platforms
Features:
- Format selection (quality presets)
- Audio extraction (MP3, FLAC, etc.)
- Subtitle download and embedding
- Playlist support
Multiple versions for extracting content from PDFs:
- Extract images with quality assessment
- OCR text recognition
- Spread detection (book scanning)
- Metadata preservation
- Multiple output formats
AI-powered image analysis using Microsoft's Florence2 model:
- Detect rectangular regions in images
- Caption generation
- Object detection
- Visual question answering
Document layout analysis:
- Detect text blocks, figures, tables
- Enhanced OCR with multiple engines
- Computer vision-based layout detection
cd A:\Comfy25\ComfyUI_windows_portableUse the embedded Python to install packages:
.\python_embeded\python.exe -m pip install -r custom_nodes\PDF_tools\requirements.txt.\python_embeded\python.exe -m pip install gallery-dl.\python_embeded\python.exe -m pip install yt-dlp- Download FFmpeg from: https://www.gyan.dev/ffmpeg/builds/
- Extract to
C:\ffmpeg\(or any location) - Add
C:\ffmpeg\binto your system PATH - Verify:
ffmpeg -version
Test that packages are installed:
# Test gallery-dl
.\python_embeded\python.exe -m gallery_dl --version
# Test yt-dlp
.\python_embeded\python.exe -m yt_dlp --version
# Test PyMuPDF
.\python_embeded\python.exe -c "import fitz; print(f'PyMuPDF {fitz.__version__}')"
# Test transformers
.\python_embeded\python.exe -c "import transformers; print(f'Transformers {transformers.__version__}')"-
Export cookies from your browser:
- Use browser extension: "Get cookies.txt LOCALLY" (Chrome/Firefox)
- Save as
configs/instagram_cookies.json(Netscape format is fine)
-
Or use browser cookies directly:
- Set
use_browser_cookies: Truein the node - Chrome requires admin privileges on Windows
- Firefox works without admin
- Set
- See
Docs/reddit_app_creation_guide.pyfor setup instructions - Note: Reddit API requires OAuth and may have rate limits
# Start ComfyUI normally
.\run_nvidia_gpu.bat
# Or with admin privileges (for Chrome cookie access)
# Right-click run_nvidia_gpu.bat → "Run as administrator"- Add "Gallery-dl Downloader" node to workflow
- Set URL:
https://www.instagram.com/janaioannaa/(or any public profile) - Set output_dir:
./test-output - Run workflow
- Check
test-output/instagram/janaioannaa/images/for downloaded files
- Add "Yt-dlp Downloader" node to workflow
- Set URL:
https://www.youtube.com/watch?v=dQw4w9WgXcQ(example) - Set output_dir:
./yt-output - Run workflow
- Check output directory for downloaded video
- Add "PDF Extractor v08" node to workflow
- Load a PDF file
- Set output directory
- Run to extract pages as images
Solution: Install with pip: python_embeded\python.exe -m pip install gallery-dl
Solution: Install with pip: python_embeded\python.exe -m pip install yt-dlp
Solution:
- Download FFmpeg: https://www.gyan.dev/ffmpeg/builds/
- Extract and add to PATH
- Or place
ffmpeg.exein ComfyUI root directory
Solution: python_embeded\python.exe -m pip install PyMuPDF
Solutions:
- Run ComfyUI as administrator (Windows security restriction)
- Or use Firefox instead (doesn't require admin)
- Or export cookies to file and use
cookie_fileparameter
Solutions:
- Export cookies from logged-in browser session
- Place in
configs/instagram_cookies.json - Set
cookie_fileparameter in node - Make sure you're logged into the site in your browser
Solutions:
- Close other GPU applications
- Reduce batch size in node settings
- Use smaller model variants
- Enable model offloading in ComfyUI settings
Solution:
.\python_embeded\python.exe -m pip install transformers>=4.35.0 --upgradeSome packages are large and optional:
- Surya OCR: ~1GB models (advanced OCR)
- SAM2: ~1-2GB models (segmentation)
- Florence2 models: ~500MB-2GB (vision models, auto-downloaded)
- PaddleOCR: ~500MB models (Chinese/English OCR)
- EasyOCR: ~1GB models (multi-language OCR)
These are commented out in requirements.txt - only install if needed.
If you only want specific features:
.\python_embeded\python.exe -m pip install gallery-dl browser-cookie3 requests.\python_embeded\python.exe -m pip install yt-dlp.\python_embeded\python.exe -m pip install PyMuPDF Pillow numpy.\python_embeded\python.exe -m pip install transformers safetensors accelerate timm-
Review the documentation:
Docs/gallery_dl_node_complete_guide.md- Gallery-dl setupDocs/yt_dlp_node_complete_guide.md- Yt-dlp setupDocs/SETUP_COMPLETE.md- Authentication setup
-
Test with example workflows:
- Start with simple single-URL downloads
- Test authentication with your accounts
- Try batch downloads from files
-
Configure for your needs:
- Set up cookie files for authenticated sites
- Create custom config files for specific sites
- Organize download directories
- Check the
Docs/folder for detailed guides - Review test scripts in
Docs/test_*.pyfor examples - Check ComfyUI console for debug output (nodes provide detailed status)
- OS: Windows 10/11 (primary), Linux (should work)
- GPU: NVIDIA GPU with CUDA (for AI models, optional for downloaders)
- RAM: 8GB minimum, 16GB+ recommended for AI models
- Storage: 5-10GB for packages + models
- Python: 3.10+ (comes with ComfyUI portable)
✅ Gallery-dl downloads (Instagram, Reddit, Twitter, etc.) ✅ Yt-dlp downloads (YouTube, TikTok, etc.) ✅ PDF extraction with PyMuPDF ✅ Florence2 rectangle detection ✅ Browser cookie authentication ✅ File organization by type ✅ Download archives (no duplicates) ✅ Metadata extraction ✅ Debug output and error handling
This is a custom node package. For issues:
- Check the documentation in
Docs/ - Review test scripts for working examples
- Check ComfyUI console for detailed error messages
- Ensure all requirements are installed correctly
Happy downloading and processing! 🚀