Skip to content

Conversation

@blepping
Copy link
Contributor

currently CADS is hard to use because generations can't be reproduced and everything downstream from the CADS node has to run again every time the workflow is queued. this small pull just adds a seed parameter to the node and uses a seeded Generator object for generating the noise.

@asagi4
Copy link
Owner

asagi4 commented Mar 24, 2024

What situations have you found where gens aren't reproduceable? ComfyUI sets the global torch seed to the one specified in KSampler when sampling starts and that should affect my node too since the noise is generated during sampling.

@blepping
Copy link
Contributor Author

What situations have you found where gens aren't reproduceable?

@asagi4 that's a good point, i guess i assumed there was a reason for forcing the workflow to run again. if they are reproducible then what is the point of the IS_CHANGED function forcing the workflow to run again unnecessarily? given they're reproducible, you'll just get the exact same result as before. or am i missing something?

@asagi4
Copy link
Owner

asagi4 commented Mar 24, 2024

The IS_CHANGED thing is necessary to reset the current step counter, since ComfyUI doesn't provide a way for for nodes to initialize their state at the start of sampling

I really should create a PR upstream that adds something like that, it would make many hacks unnecessary.

@blepping
Copy link
Contributor Author

@asagi4

ah, yeah, i figured that out after a while. how about #5 then?

I really should create a PR upstream that adds something like that

good luck getting it merged (or acknowledged even)!

ComfyUI sets the global torch seed to the one specified in KSampler when sampling starts

this is actually not true due a bug in ComfyUI - the seed only gets set sometimes when add_noise isn't enabled ( comfyanonymous/ComfyUI#2841 ). so far no response at all to the issue or pull request fixing it.

anyway, i will just close this one.

@blepping blepping closed this Mar 24, 2024
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