- Remove all API REST calls from get_model_info and get_model_files
- Remove CLI fallback from download_file
- Use only huggingface_hub for everything
- Add snapshot_download support for entire repos
- Remove deprecated local_dir_use_symlinks parameter
- Much cleaner and more reliable approach
- Try diffusion_models first as user confirmed it exists in ComfyUI
- Added proper fallback chain: diffusion_models -> unet -> checkpoints
- This should correctly use the diffusion_models folder
- Better folder mapping for ComfyUI structure
- Changed fallback logic to use unet for diffusion_models
- diffusion_models doesn't exist in ComfyUI, unet is the correct folder
- This ensures Wan 2.2 models go to unet folder
- Better integration with ComfyUI's actual folder structure
- Added fallback logic for unet -> diffusion_models
- If unet folder doesn't exist, use diffusion_models
- This ensures Wan 2.2 models go to diffusion_models
- Better integration with ComfyUI's folder structure
Now diffusion_models should work correctly!
- Remove duplicated 'main/' prefix from filename
- Prevents 'main/main/NSFW/file.safetensors' URLs
- Fixes 404 errors for direct downloads
- Now correctly generates 'NSFW/file.safetensors' paths
This should finally fix the download issues!
- Changed path_parts[2] to path_parts[3] for 'resolve' check
- Fixed model_id extraction to path_parts[1:3] instead of [0:2]
- Fixed filename extraction to path_parts[4:] instead of [3:]
- This should finally fix the 'model.safetensors' fallback issue
- Direct downloads should now work with correct file paths
- Added detailed debug output for path parsing
- This will help identify why URL parsing fails
- Shows path parts and extraction process
- Will help fix the 'model.safetensors' fallback issue
- Fixed path_parts index check from [1] to [2] for /resolve/main/
- This ensures correct extraction of filename from URL
- Fixes 'Invalid URL None' error in downloads
- Direct downloads should now work with proper file paths
- Changed get_model_dir() to use PLUGIN_ROOT/other_models for 'other' type
- Keeps files organized within our extension directory
- Cleaner than cluttering ComfyUI custom_nodes
- Better separation of concerns
- diffusionmodels -> diffusion_models (Wan 2.2 and similar)
- unet -> unet (GGUF models)
- Updated both helpers.py and config.py
- This ensures Wan 2.2 models go to /models/diffusion_models
- GGUF models go to /models/unet
Fixes incorrect folder assignments
- Added get_model_folder_paths() function
- Added get_model_type_folder_name() function
- These were imported by GetModelDirs.py but missing from helpers.py
- This should fix the remaining import error and restore the button
- Complete rewrite of utils/helpers.py
- Added get_model_dir() function for path resolution
- Added sanitize_filename() function
- Fixed parse_huggingface_input() for HF URLs
- Added model type normalization and aliases
- This should fix the import error and restore the button
- Rewrote parse_huggingface_input() for HF URLs
- Support direct download URLs with /resolve/main/
- Simplified DownloadModel.py for HF API
- Proper model ID extraction (username/repo format)
- File selection logic for .safetensors or largest file
- Fixed API calls to use correct HF endpoints
Should now handle URLs like:
https://huggingface.co/FX-FeiHou/wan2.2-Remix/resolve/main/NSFW/file.safetensors
- Converted CivitaiAPI to HuggingFaceAPI
- Updated all references from civitai to huggingface
- Renamed web files (CSS/JS)
- Implemented core HF API methods:
* search_models()
* get_model_info()
* get_model_files()
* download_file()
- Clean API structure for HuggingFace integration
Next: Update server routes and helpers for HF endpoints