• PengGao's avatar
    Refactor/api (#94) · 398b598a
    PengGao authored
    * fix: correct frequency computation in WanTransformerInfer
    
    * refactor: restructure API server and distributed inference services
    
    - Removed the old api_server_dist.py file and integrated its functionality into a new modular structure.
    - Created a new ApiServer class to handle API routes and services.
    - Introduced DistributedInferenceService and FileService for better separation of concerns.
    - Updated the main entry point to initialize and run the new API server with distributed inference capabilities.
    - Added schema definitions for task requests and responses to improve data handling.
    - Enhanced error handling and logging throughout the services.
    
    * refactor: enhance API structure and file handling in server
    
    - Introduced APIRouter for modular route management in the ApiServer class.
    - Updated task creation and file download endpoints to improve clarity and functionality.
    - Implemented a new method for streaming file responses with proper MIME type handling.
    - Refactored task request schema to auto-generate task IDs and handle optional video save paths.
    - Improved error handling and logging for better debugging and user feedback.
    
    * feat: add configurable parameters for video generation
    
    - Introduced new parameters: infer_steps, target_video_length, and seed to the API and task request schema.
    - Updated DefaultRunner and VideoGenerationService to handle the new parameters for enhanced video generation control.
    - Improved default values for parameters to ensure consistent behavior.
    
    * refactor: enhance profiling context for async support
    
    * refactor: improve signal handling in API server
    
    * feat: enhance video generation capabilities with audio support
    
    * refactor: improve subprocess call for audio-video merging in wan_audio_runner.py
    
    * refactor: enhance API server argument parsing and improve code readability
    
    * refactor: enhance logging and improve code comments for clarity
    
    * refactor: update response model for task listing endpoint to return a dictionary
    
    * docs: update API endpoints and improve documentation clarity
    
    * refactor: update API endpoints in scripts for task management and remove unused code
    
    * fix: pre-commit
    398b598a
api_server.py 3.03 KB