Skip to content

Conversation

@kohya-ss
Copy link
Owner

@kohya-ss kohya-ss requested a review from Copilot September 13, 2025 10:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Refactors safetensors utilities into a separate module to improve code organization and loading performance. This change extracts safetensors-related functionality from the main utils module and optimizes memory-efficient loading with enhanced device synchronization.

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
library/safetensors_utils.py New module containing memory-efficient safetensors utilities, enhanced loading functions, and improved device handling
library/utils.py Removes safetensors utilities and improves code formatting
library/device_utils.py Adds synchronize_device function and improves clean_memory_on_device type hints
library/custom_offloading_utils.py Updates to use renamed private functions and adds local utility functions
Multiple training/inference files Updates imports to use new safetensors_utils module

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kohya-ss kohya-ss merged commit f5d44fd into sd3 Sep 13, 2025
3 checks passed
@kohya-ss kohya-ss deleted the feat-faster-safetensors-load branch September 13, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant