Commit Graph
23 Commits
Author SHA1 Message Date
huchukato 5ed4907983 Remove fallback imports that were causing errors
- Remove try/except imports that were failing
- Keep only relative imports that work
- Fix 'No module named api' error
- Simplify import structure
2026-02-21 07:20:54 +01:00
huchukato bd68bfff4d Fix utils/__init__.py imports
- Add resolve_huggingface_api_key and get_request_json
- Add try/except for relative imports
- Fix import errors that were breaking extension
- Restore button functionality
2026-02-21 07:19:00 +01:00
huchukato 42e9917f33 Replace API calls with huggingface_hub completely
- 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
2026-02-21 07:00:18 +01:00
huchukato 012941daab Restore diffusion_models folder mapping
- 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
2026-02-21 04:14:13 +01:00
huchukato 020215cbc2 Fix diffusion_models folder mapping to use unet
- 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
2026-02-21 04:13:10 +01:00
huchukato 5c131eecd9 Fix diffusion_models folder mapping
- 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!
2026-02-21 03:05:02 +01:00
huchukato 3e87a38730 Fix duplicate 'main/' in HF download URLs
- 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!
2026-02-21 02:57:51 +01:00
huchukato 1ed94c3083 Fix URL parsing index for HuggingFace direct downloads
- 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
2026-02-21 02:45:43 +01:00
huchukato b5c2ad46e5 Add debug logging for URL parsing
- 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
2026-02-21 02:43:25 +01:00
huchukato 3bdb612b5b Fix URL parsing for HuggingFace direct downloads
- 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
2026-02-21 02:39:13 +01:00
huchukato 84fd46ca66 Move 'other' folder to extension directory instead of custom_nodes
- 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
2026-02-21 02:32:16 +01:00
huchukato 63dbca44a1 Fix model folder mappings for correct file organization
- 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
2026-02-21 02:23:56 +01:00
huchukato 88ae2af368 Add missing helper functions causing import failure
- 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
2026-02-21 02:20:43 +01:00
huchukato 26d7f28203 Fix missing helpers.py causing import failure
- 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
2026-02-21 02:19:08 +01:00
huchukato 1981bdfded Fix HuggingFace URL parsing and download logic
- 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
2026-02-21 02:14:25 +01:00
huchukato 66e00264a0 Initial HuggingFace API implementation
- 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
2026-02-21 01:52:05 +01:00
MoonGoblin 7c0791ed9c feat: support env API key and global model root paths 2026-02-14 12:32:29 +07:00
MoonGoblin d03355ad05 folder dir revamp 2025-09-11 17:31:49 +08:00
MoonGoblin 401c0a0787 Refactor 2025-08-09 16:22:20 +08:00
MoonGoblin e5e167013b Play video thumbnail & fix placeholder 2025-04-08 17:28:59 +08:00
MoonGoblin c66a36a22d Some cleaning up 2025-04-04 08:34:33 +07:00
MoonGoblin e3daea29f5 some technical debt 2025-04-02 00:54:01 +07:00
MoonGoblin e08f26af06 First commit 2025-04-01 15:02:49 +07:00