Commit Graph

42 Commits

Author SHA1 Message Date
Will Miao 1420ab31a2 Enhance CivitaiClient error handling for unauthorized access
- Updated handling of 401 unauthorized responses to differentiate between API key issues and early access restrictions.
- Improved logging for unauthorized access attempts.
- Refactored condition to check for early access restrictions based on response headers.
- Adjusted logic in DownloadManager to check for early access using a more concise method.
2025-03-28 04:11:08 +08:00
Will Miao 0459710c9b Made CLIP input optional in LoRA Loader, enabling compatibility with Hunyuan workflows 2025-03-26 21:50:26 +08:00
Will Miao 83582ef8a3 Refactor RecipeScanner to remove custom async timeout and streamline cache initialization
- Removed the custom async_timeout function and replaced it with direct usage of the initialization lock.
- Simplified the cache initialization process by eliminating the dependency on the lora scanner.
- Enhanced error handling during cache initialization to ensure a fallback to an empty cache on failure.
2025-03-26 18:56:18 +08:00
AlUlkesh 509e513f3a Python < 3.11 backward compatibility for timeout. 2025-03-24 14:16:46 +01:00
Will Miao c402f53258 Implement early access handling and UI enhancements for LoRA downloads
- Added error handling for early access restrictions in the API routes, returning appropriate status codes and messages.
- Enhanced the Civitai client to log unauthorized access attempts and provide user-friendly error messages.
- Updated the download manager to check for early access requirements and log warnings accordingly.
- Introduced UI elements to indicate early access status for LoRAs, including badges and warning messages in the import manager.
- Improved toast notifications to inform users about early access download failures and provide relevant information.
2025-03-23 14:45:11 +08:00
Will Miao 93329abe8b Refactor LoraFileHandler to use provided event loop and improve logging
- Updated LoraFileHandler to utilize the passed event loop for time retrieval instead of the current thread's event loop.
- Changed error logging for extension loading in mappers from error to warning level for better clarity.
2025-03-23 09:22:57 +08:00
Will Miao 4ee32f02c5 Add functionality to save recipes from the LoRAs widget
- Introduced a new API endpoint to save recipes directly from the LoRAs widget.
- Implemented logic to handle recipe data, including image processing and metadata extraction.
- Enhanced error handling for missing fields and image retrieval.
- Updated the ExifUtils to extract generation parameters from images for recipe creation.
- Added a direct save option in the widget, improving user experience.
2025-03-21 11:11:09 +08:00
Will Miao 607ab35cce Refactor search functionality in Lora and Recipe scanners to utilize fuzzy matching
- Introduced a new fuzzy_match utility function for improved search accuracy across Lora and Recipe scanners.
- Updated search logic in LoraScanner and RecipeScanner to leverage fuzzy matching for titles, tags, and filenames, enhancing user experience.
- Removed deprecated search methods to streamline the codebase and improve maintainability.
- Adjusted API routes to ensure compatibility with the new search options, including recursive search handling.
2025-03-20 16:55:51 +08:00
Will Miao 4a47dc2073 Add new API routes for base models and update existing routes
- Introduced a new endpoint for retrieving base models used in loras, enhancing the API functionality.
- Updated the existing top-tags route to reflect the new URL structure under '/api/loras'.
- Modified the FilterManager to accommodate the new base models API, ensuring proper data fetching and display on the loras page.
- Improved error handling and logging for base model retrieval, enhancing overall robustness of the application.
2025-03-20 15:19:05 +08:00
Will Miao caf5b1528c Enhance recipe search functionality with improved state management and search options
- Introduced new search options for recipes, allowing users to filter by title, tags, LoRA filename, and LoRA model name.
- Updated the RecipeRoutes and RecipeScanner to accommodate the new search options, enhancing the filtering capabilities.
- Refactored RecipeManager and RecipeSearchManager to utilize the hierarchical state structure for managing search parameters and pagination state.
- Improved the user interface by dynamically displaying relevant search options based on the current page context.
2025-03-20 08:27:38 +08:00
Will Miao 8a28846bac Merge branch 'main' into dev 2025-03-19 17:34:29 +08:00
Will Miao f38b51b85a Enhance RecipeScanner and CSS components for improved functionality and styling
- Added localPath retrieval for LoRA entries in RecipeScanner to enhance metadata handling.
- Included shared.css in the main stylesheet for better component styling consistency.
- Removed unused local-badge and local-path styles from download-modal.css and recipe-modal.css to streamline the CSS and improve maintainability.
2025-03-19 08:21:51 +08:00
Will Miao e2191ab4b4 Refactor recipe metadata processing in RecipeRoutes
- Introduced a new RecipeParserFactory to streamline the parsing of recipe metadata from user comments, supporting multiple formats.
- Removed legacy metadata extraction logic from RecipeRoutes, delegating responsibilities to the new parser classes.
- Enhanced error handling for cases where no valid parser is found, ensuring graceful responses.
- Updated the RecipeScanner to improve the handling of LoRA metadata and reduce logging verbosity for better performance.
2025-03-18 18:54:22 +08:00
Will Miao 3f38764a0e Add filter-related endpoints to RecipeRoutes for top tags and base models. Enhance get_paginated_data method in RecipeScanner to support filtering by base model and tags. Implement logic to retrieve and count occurrences of top tags and base models from cached recipes. 2025-03-16 21:21:00 +08:00
Will Miao 3338c17e8f Refactor recipe processing in RecipeRoutes to enhance LoRA handling. Introduce base model counting logic to determine the most common base model from LoRAs, and streamline the collection of LoRA metadata. Remove outdated metadata update method from RecipeScanner to improve code clarity and maintainability. 2025-03-16 18:56:27 +08:00
Will Miao 406284a045 checkpoint 2025-03-16 16:56:33 +08:00
Will Miao edd36427ac Refactor recipe management to enhance initialization and metadata handling. Improve error logging during cache pre-warming, streamline recipe data structure, and ensure proper handling of generation parameters. Update UI components for missing LoRAs with improved summary and toggle functionality. Add new methods for adding recipes to cache and loading recipe data from JSON files. 2025-03-15 20:08:26 +08:00
Will Miao 9a1fe19cc8 Enhance DownloadManager and LoraFileHandler to support dynamic ignore path management with expiration times. Added handling for alternative path formats and improved logging for added and removed paths. 2025-03-15 14:58:40 +08:00
Will Miao 9059795816 Enhance DownloadManager to update hash index with new LoRA entries, improving file tracking during downloads. 2025-03-15 10:16:52 +08:00
Will Miao c76b287aed Normalize SHA256 hash handling by converting to lowercase in LoraScanner and LoraMetadata classes for consistency. 2025-03-15 09:56:28 +08:00
Will Miao e498c9ce29 Normalize SHA256 hash handling by converting to lowercase in LoraScanner and LoraMetadata classes for consistency. 2025-03-15 07:25:00 +08:00
Will Miao 9bb4d7078e checkpoint 2025-03-15 05:29:25 +08:00
Will Miao 004c203ef2 Merge branch 'main' into dev 2025-03-13 11:45:43 +08:00
Will Miao e992ace11c Add NSFW browse control functionality - Done 2025-03-12 22:21:30 +08:00
Will Miao 0cad6b5cbc Add nsfw browse control part 1 2025-03-12 21:06:31 +08:00
Will Miao e9a703451c Fix the problem of repeatedly trying to fetch model description metadata when the model has a null description. 2025-03-12 15:25:58 +08:00
Will Miao 03ddd51a91 Fetch and update model metadata including tags and description in ApiRoutes and DownloadManager 2025-03-12 14:50:06 +08:00
Will Miao 9142cc4cde Enhance CivitaiClient to return HTTP status code with model metadata; update LoraScanner to handle deleted models 2025-03-12 11:18:19 +08:00
Will Miao 8e5e16ce68 Refactor logging and update badge visibility in UpdateService; improve path normalization in file_utils 2025-03-12 10:06:15 +08:00
Will Miao 2783782669 Add search options panel and functionality for filename, model name, and tags 2025-03-10 19:33:45 +08:00
Will Miao 721bef3ff8 Add tag filtering checkpoint 2025-03-10 13:18:56 +08:00
Will Miao 0069f84630 Add model description in lora details 2025-03-10 00:20:31 +08:00
Will Miao 250e8445bb checkpoint 2025-03-09 12:29:24 +08:00
Will Miao e6aafe8773 Add recipes checkpoint 2025-03-08 23:10:24 +08:00
Will Miao 69b1773ced Add inline model name editing with validation and resortable cache 2025-03-07 10:32:27 +08:00
Will Miao c9c86d8c0f Add local availability check for Civitai model versions; enhance download manager UI to indicate local status 2025-03-06 20:45:09 +08:00
Will Miao f614dbf700 Add filters - base model only for now 2025-03-05 19:53:52 +08:00
Will Miao a38757fee6 Refactor progress reporting in DownloadManager and improve selection logic in MoveManager 2025-03-03 18:51:35 +08:00
Will Miao 61dc766075 Add environment variable checks to settings manager 2025-02-27 08:14:11 +08:00
Will Miao 561e32a980 Fix getting stuck when loras folder is empty 2025-02-27 06:52:19 +08:00
Will Miao cc09fe7525 Fix setting path 2025-02-24 21:36:46 +08:00
Will Miao 2d72044d66 Reorganize python files 2025-02-24 20:41:16 +08:00