feat: enable dynamic cpu-offloading for qwen image based models#791
Open
Cyclica-bin wants to merge 1 commit intonunchaku-ai:mainfrom
Open
feat: enable dynamic cpu-offloading for qwen image based models#791Cyclica-bin wants to merge 1 commit intonunchaku-ai:mainfrom
Cyclica-bin wants to merge 1 commit intonunchaku-ai:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This PR automates CPU offloading in
NunchakuQwenImageDiTLoader, replacing the manual block-count parameter with a dynamic offloading system.Currently, users must manually specify the number of blocks to load into VRAM. This leads to:
--lowvramflag if user has sufficient RAM.Modifications
num_blocks_on_gpu: Removed the manual input parameter from the ComfyUI node since users no longer need to guess how many transformer blocks their free VRAM can hold.load_model: Removed the same parameter from the argument list ofload_modelmethod.Checklist
pre-commit run --all-files).Note: Other checklists are not applicable as this is an extension to existing node.
orWeChatto discuss your PR.