Commit Graph
166 Commits
Author SHA1 Message Date
huchukato 8268b3f242 Enable multi-connection settings in UI
- Remove disabled attribute from connections input
- Update default connections from 1 to 4 for better performance
- Fix help text to explain connection functionality
- Allow users to configure parallel connections (1-16)
- Enable multi-connection downloads in settings panel
2026-03-04 05:07:34 +01:00
huchukato 6b58f7d1e2 Fix multi-connection downloads - respect user settings
- Remove forced single connection override in ChunkDownloader
- Allow user to choose connection type from Settings
- Fix num_connections parameter to work as intended
- Enable multi-connection downloads for faster speeds
- Remove hardcoded HF single connection limitation
2026-03-04 04:43:06 +01:00
huchukato 53d7861151 Add 'Buy Me a Coffee' badge to README
Added a 'Buy Me a Coffee' badge to the README.
2026-02-27 07:33:54 +01:00
huchukato 03a12a169d Fix HuggingFace path handling for Civitai-style models
- Extract base repository ID from full paths (remove /tree/main, /blob/main, /raw/)
- Update View button to use baseRepoId instead of full modelId path
- Update all download buttons to use baseRepoId for proper API calls
- Support complex HuggingFace paths like 'user/repo/tree/main/file'
- Ensure compatibility with models from Civitai and other sources
- Fix issue where search couldn't handle repository sub-paths
2026-02-23 01:12:37 +01:00
huchukato fd5ad107e8 Enable download buttons from search results
- Remove disabled attribute from download buttons when versionId is missing
- Allow downloading latest version when no specific version is available
- Update button title to show 'Download latest version' for clarity
- Relax validation to only require modelId, not versionId
- Fix issue where search results couldn't trigger downloads
2026-02-23 01:06:19 +01:00
huchukato bef966cd22 Fix search functionality: correct View links and enable download buttons
- Fix View button links: remove /models/ prefix for direct repository URLs
- Add missing data attributes (creator, modelName) to download buttons
- Update event listener to read all button data for proper form pre-filling
- Auto-suggest filename from model name with proper sanitization
- Improve feedback message to show model name and creator
- Ensure download buttons work correctly from search results
2026-02-23 00:53:22 +01:00
huchukato fe3b1d55e6 Fix English badge in README_IT
- Changed from Italian badge to English badge for consistency
- Badge now shows 'English-🇬🇧-blue' pointing to README.md
- Maintains proper bidirectional linking between README files
2026-02-21 09:35:25 +01:00
huchukato 5b7a77bb53 Fix Italian badge in README
- Simplified badge text from 'Language-🇮🇹-Italian-red' to 'Italian-🇮🇹-red'
- Ensures proper badge rendering and visibility
- Maintains link to README_IT.md
2026-02-21 09:34:30 +01:00
huchukato add46f5cb2 Create separate Italian README with language badges
- Restore English README.md as main documentation
- Create README_IT.md for Italian documentation
- Add language badges to both files for easy switching
- Professional bilingual documentation setup
- Link between English and Italian versions
2026-02-21 08:30:06 +01:00
huchukato 9a3aacc178 Create comprehensive README in Italian with badges
- Complete rewrite with all features documented
- Add professional badges (Python, License, ComfyUI, HuggingFace)
- Italian translation for better accessibility
- Detailed feature descriptions with emojis
- Technical implementation details
- Migration guide from Civicomfy
- Installation and usage instructions
- API endpoints documentation
- Contributing guidelines and requirements
2026-02-21 08:27:47 +01:00
huchukato 90e9580fe6 Fix sort parameter mapping for huggingface_hub API
- Map frontend sort values to valid huggingface_hub sort values
- Remove invalid 'relevancy' sort (use default ordering)
- Fix 400 Bad Request error for invalid sort parameter
- Support: downloads, likes, created_at, modelId
2026-02-21 08:05:22 +01:00
huchukato c49cc38e0c Fix HfApi method from search_models to list_models
- HfApi doesn't have search_models method
- Use list_models instead with search parameter
- Fix 'HfApi' object has no attribute 'search_models' error
- Update parameter names to match list_models API
2026-02-21 08:02:48 +01:00
huchukato 32f03672f1 Improve model details error handling and fallbacks
- Add try/catch around API info calls
- Try ModelCard first, then API fallback, then minimal info
- Better error messages and logging
- Prevent complete failure when one method fails
- Always return some model info instead of errors
2026-02-21 08:01:51 +01:00
huchukato 62c1ead910 Remove scary error messages for missing model details
- Change red error text to neutral gray color
- Replace 'Failed to get details' with 'Model details not available'
- Change console.error to console.info for missing details
- Prevent users from seeing scary error messages
- Better user experience for models without details
2026-02-21 07:44:25 +01:00
huchukato eaf88d3947 Use hf_hub_download for single files, snapshot_download for repos
- Detect if URL contains specific file or entire repo
- Use hf_hub_download for single files with filename
- Use snapshot_download for entire repo downloads
- Fix single file downloads to use correct huggingface_hub function
2026-02-21 07:40:33 +01:00
huchukato 7ef9786c8a Fix repo_id extraction for snapshot_download
- Extract just namespace/repo_name from full URL
- Handle both URL and plain repo_id formats
- Fix HFValidationError for invalid repo_id format
- Support proper snapshot_download usage
2026-02-21 07:39:24 +01:00
huchukato 4e4f4bec26 Skip ChunkDownloader for repo downloads
- Don't set downloader_instance for repo downloads
- Skip downloader.download() call for repo downloads
- Repo downloads already completed with snapshot_download
- Fix error where repo downloads tried to use ChunkDownloader
2026-02-21 07:32:14 +01:00
huchukato f717d2089a Simplify repo downloads to use snapshot_download directly
- Remove complex API wrapper for repo downloads
- Use huggingface_hub snapshot_download directly
- Much simpler and more reliable approach
- Just pass repo_id and local_dir to snapshot_download
2026-02-21 07:29:28 +01:00
huchukato 4a086a88e2 Fix download manager to handle url=None for repo downloads
- Add special handling for url=None (repo downloads)
- Use huggingface_hub directly for entire repo downloads
- Prevent ChunkDownloader from receiving None URL
- Fix 'Invalid URL None' error for diffusers models
- Support both file and repository downloads
2026-02-21 07:27:39 +01:00
huchukato 46cdfa31c0 Fix import paths - utils.py is directly in server/
- Change from .utils to ..utils for resolve_huggingface_api_key
- utils.py is directly in server/ not in server/utils/
- Fix 'No module named server.routes.utils' error
- Restore button functionality
2026-02-21 07:24:53 +01:00
huchukato eb70af7f88 Fix import paths for resolve_huggingface_api_key
- Change from ..utils to .utils for resolve_huggingface_api_key
- Fix import errors that were breaking extension
- All routes now import from correct location
- Restore button functionality
2026-02-21 07:22:41 +01:00
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 089085cce7 Fix relative imports in utils.py
- Add try/except for relative imports
- Fallback to absolute imports for testing
- Fix import errors that were breaking the extension
- Restore button functionality
2026-02-21 07:17:07 +01:00
huchukato 221e172a65 Add missing fields to download_info
- Add api_key, known_size, huggingface_version_info
- Add huggingface_primary_file, thumbnail, model_version_id
- Add custom_filename, huggingface_model_name
- Prevent manager warnings for missing fields
- Better download manager integration
2026-02-21 07:15:21 +01:00
huchukato 00d90b6b45 Enable NSFW by default in search
- Set nsfw=True as default value
- Users don't need to enable it every time
- Can still be disabled by setting nsfw=false
- Better user experience for model discovery
2026-02-21 07:14:23 +01:00
huchukato 3a1e0f8674 Rewrite SearchModels to use huggingface_hub
- Remove Meilisearch API calls
- Use huggingface_hub HfApi.search_models()
- Simplify search logic and parameters
- Better integration with huggingface_hub
- Fix syntax errors in f-strings
2026-02-21 07:13:47 +01:00
huchukato 24b3f5598a Rewrite GetModelDetails to use HuggingFace model cards
- Remove complex Civitai-style logic
- Use huggingface_hub ModelCard to read model cards
- Extract base_model, tags, license from YAML frontmatter
- Get description from model card text
- Much cleaner and more accurate for HuggingFace models
2026-02-21 07:11:40 +01:00
huchukato 7b52d41ad1 Add dynamic base model detection
- Use HuggingFace API to get popular base models
- Add common base models like SDXL, SD1.5, FLUX
- Keep hardcoded list as fallback
- Better base model filtering for search
2026-02-21 07:10:07 +01:00
huchukato 362d23575f Fix download_url for None target_filename
- Don't construct URL when target_filename is None
- Let huggingface_hub handle repo downloads
- Prevent 404 errors with resolve/main/None
- Better handling for repo vs file downloads
2026-02-21 07:08:38 +01:00
huchukato ce94275957 Fix None target_filename handling
- Add proper handling for target_filename = None
- Use model name as folder name for repo downloads
- Prevent TypeError when os.path.basename(None)
- Better logic for repo vs file downloads
2026-02-21 07:05:35 +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 534f21ac6b Add required dependencies to pyproject.toml
- Add huggingface_hub>=0.20.0 dependency
- Add requests>=2.25.0 dependency
- This ensures huggingface_hub is installed with the extension
- ComfyUI will automatically install these dependencies
2026-02-21 06:36:27 +01:00
huchukato 38fcd86a8b Simplify approach: API only for token, huggingface_hub for everything
- Skip API calls for public repos entirely
- Use API only for private repos to get model info
- Always use huggingface_hub for downloads
- Let huggingface_hub auto-detect files
- Much cleaner and more reliable approach
2026-02-21 06:34:18 +01:00
huchukato 3c91c9d604 Remove deprecated local_dir_use_symlinks parameter
- Remove --local-dir-use-symlinks False from CLI command
- This parameter is deprecated in huggingface_hub
- Simplified CLI command for better compatibility
- Should work with latest huggingface_hub version
2026-02-21 06:32:25 +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 0ef7a9db4b Add comprehensive frontend debug for model name issue
- Added full_item logging to see all available fields
- Added final modelName logging to see what gets displayed
- This will help identify why model name isn't showing despite backend working
- More detailed debugging to track the data flow
2026-02-21 04:11:40 +01:00
huchukato e0cb621c49 Remove /api/ prefix from frontend API calls
- ComfyUI automatically adds /api/ prefix to routes
- Frontend was calling /api/huggingface/ which became /api/api/huggingface/
- Changed back to /huggingface/ to let ComfyUI handle the prefix
- This should fix 404 errors for all endpoints
2026-02-21 04:11:13 +01:00
huchukato 435a1519bd Add default value for huggingface_model_name in manager
- Added explicit default None for huggingface_model_name when missing
- This ensures the field exists in the download item
- Frontend should now receive the field even if initially missing
- Better handling of missing fields in download_info
2026-02-21 04:10:10 +01:00
huchukato b4ad945162 Add fallback model name extraction for HF models
- When HF API fails to find model info, use parsed name from model_id
- Added debug output for fallback path
- This handles cases where HF models don't have proper model cards
- Ensures model name is always available even for obscure models
2026-02-21 04:08:36 +01:00
huchukato 5ba91fc75e Fix all routes to use /api/ prefix
- Updated all HuggingFace routes to use /api/huggingface/ prefix
- This fixes 405 Method Not Allowed errors for all endpoints
- Frontend and backend paths now match consistently
- All API calls should work correctly now
2026-02-21 04:07:15 +01:00
huchukato e072f140e7 Fix get_model_details route to use /api/ prefix
- Changed route from /huggingface/get_model_details to /api/huggingface/get_model_details
- This fixes the 405 Method Not Allowed error
- Frontend was calling /api/ but route was registered without /api/
- Now frontend and backend paths match
2026-02-21 04:05:27 +01:00
huchukato 322fd81d72 Update README to remove ComfyUI Manager steps
Removed installation instructions for ComfyUI Manager.
2026-02-21 04:04:02 +01:00
huchukato 9ec8e0af1e Fix API endpoints to use /api/ prefix
- Added /api/ prefix to all HuggingFace API endpoints
- ComfyUI serves routes with /api/ prefix
- This should fix 404 errors for get_model_details and other endpoints
- All API calls should now work correctly
2026-02-21 04:01:48 +01:00
huchukato a6f8bdbc41 Add huggingface_model_name to manager required fields
- Added huggingface_model_name to required_for_retry list
- Manager was not copying this field from download_info
- This should fix the model name display in frontend
- Frontend should now receive the correct model name
2026-02-21 03:59:07 +01:00
huchukato 567f60c6fa Add debug for direct download model name extraction
- Added debug output for direct download path
- Shows when model name is extracted from model_id
- Helps identify why model name might not be set correctly
- More comprehensive debugging for direct download scenario
2026-02-21 03:56:18 +01:00
huchukato 3af12af57f Add frontend debug for model name display
- Added console.log to show what frontend receives from backend
- Will display huggingface_model_name, model_name, model, version_name
- Helps identify if frontend receives correct data
- Debug in browser console for frontend issues
2026-02-21 03:54:31 +01:00
huchukato c6c9723362 Add debug for response huggingface_model_name
- Added debug output for response data huggingface_model_name
- Will show what name is being sent to frontend
- Helps identify if frontend receives the correct model name
- More comprehensive debugging for model name issue
2026-02-21 03:52:07 +01:00
huchukato 605a3b4e3d Fix model_info JSON parsing issue
- Added JSON parsing for model_info when it's a string
- Backend was sending model_info as JSON string instead of dict
- Now correctly extracts 'name' field from parsed JSON
- This should fix the model name display issue
2026-02-21 03:49:00 +01:00