Skip to content
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

KSampler (inspire) incompatibility using Euler A #115

Open
EgorkaSanyok opened this issue Dec 28, 2024 · 0 comments
Open

KSampler (inspire) incompatibility using Euler A #115

EgorkaSanyok opened this issue Dec 28, 2024 · 0 comments

Comments

@EgorkaSanyok
Copy link

This following behavior happens only with smZNodes installed, vanilla ComfyUI is not affected:

I've been trying to reproduce an image created with the core KSampler, using a workflow that uses the KSampler (inspire) node (https://github.com/ltdrdata/ComfyUI-Inspire-Pack), but I was unable to do it. Upon investigation, it seems that euler_ancestral, dpm_2_ancestral and potentially all other stochastic samplers are the culprits, since I am able to reproduce an image just fine with non-stochastic samplers like euler.

I'll illustrate the issue in the ComfyUI's default workflow, adding only the KSampler (inspire) nodes. noise_mode is set to CPU to match core KSampler, and the rest of the options are set to be identical. To prevent cache copying between nodes, I've changed the batch_seed_mode of both inspire nodes to incremental and comfy respectively, and it shouldn't have an effect on the output since the latent image batch is set to 1.

image5

At first, we notice that core KSampler's output is different from the inspire one, which illustrates the reproducibility issue. However, we then notice that the second inspire node's output is different from the first inspire node. One would expect the output to be at least very similar, even if the samplers are stochastic. If one clears the node caches and runs this workflow again, we'll see that the inspire nodes will produce different images yet again, while the core KSampler stays constant throughout.

To further illustrate this issue, one can cycle through variation_seeds with a variation_strength of 0, which should not impact the output in any way (as it currently behaves in a vanilla ComfyUI install), and observe that whenever euler_ancestral is selected as a sampler, the output is always very noticeably different.

This is the behavior with a vanilla ComfyUI install:

image6

The difference between the core KSampler output in the vanilla install vs the smZNodes install is addressed in #114

shiimizu added a commit that referenced this issue Dec 29, 2024
* By undoing TorchHijack if it's not applied.
* Global seed should be set.

Addresses #115
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

No branches or pull requests

1 participant