• David El Malih's avatar
    Improve docstrings and type hints in scheduling_ddpm.py (#12651) · 3c1ca869
    David El Malih authored
    * Enhance type hints and docstrings in scheduling_ddpm.py
    
    - Added type hints for function parameters and return types across the DDPMScheduler class and related functions.
    - Improved docstrings for clarity, including detailed descriptions of parameters and return values.
    - Updated the alpha_transform_type and beta_schedule parameters to use Literal types for better type safety.
    - Refined the _get_variance and previous_timestep methods with comprehensive documentation.
    
    * Refactor docstrings and type hints in scheduling_ddpm.py
    
    - Cleaned up whitespace in the rescale_zero_terminal_snr function.
    - Enhanced the variance_type parameter in the DDPMScheduler class with improved formatting for better readability.
    - Updated the docstring for the compute_variance method to maintain consistency and clarity in parameter descriptions and return values.
    
    * Apply `make fix-copies`
    
    * Refactor type hints across multiple scheduler files
    
    - Updated type hints to include `Literal` for improved type safety in various scheduling files.
    - Ensured consistency in type hinting for parameters and return types across the affected modules.
    - This change enhances code clarity and maintainability.
    3c1ca869
scheduling_consistency_decoder.py 6.76 KB