8000 Add prepare_sampling wrapper to allow modifying noise_shape by Kosinkadink · Pull Request #7500 · comfyanonymous/ComfyUI · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add prepare_sampling wrapper to allow modifying noise_shape #7500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

Kosinkadink
Copy link
Collaborator
@Kosinkadink Kosinkadink commented Apr 5, 2025

Most likely starting 4 months ago with the memory management changes, memory usage expectation for context window-related sampling (such as with AnimateDiff-Evolved) is vastly overestimated. There doesn't seem to be anything 'wrong' with that code - ComfyUI is simply trying to account for things in memory estimation it wasn't before.

In practice, this at best decreases performance by >25% due to models being forced to be loaded partially with high total latent counts, and at worst causes new edge cases that may cause crashes on select workflows.

This PR adds a wrapper around the prepare_sampling function to allow custom nodes to provide a better estimate for noise_shape without the need for any monkey patching.

Related PR that will be merged into AnimateDiff-Evolved once this is merged: Kosinkadink/ComfyUI-AnimateDiff-Evolved#549

@comfyanonymous comfyanonymous merged commit e346d85 into master Apr 9, 2025
6 checks passed
@comfyanonymous comfyanonymous deleted the prepare-sampling-wrapper branch April 9, 2025 13:43
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.

2 participants
0