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

A fixed-seed value and specifier are disregarded #42

Open
lutusp opened this issue Feb 20, 2024 · 1 comment
Open

A fixed-seed value and specifier are disregarded #42

lutusp opened this issue Feb 20, 2024 · 1 comment

Comments

@lutusp
Copy link

lutusp commented Feb 20, 2024

While converting a KSampler control that specifies a fixed seed value, this extension's code always creates:

seed=random.randint(1, 2**64)

... regardless of the provided seed value and the "fixed" specifier in the "control_after_generate" field.

This issue comes up while creating a series of images that use a "ConditioningAverage" control to morph between two text descriptions. If the original seed value is manually entered instead of random.randint(1, 2**64), the code works as expected.

@atmaranto
Copy link

atmaranto commented Mar 10, 2024

Unfortunately, this was likely originally implemented to conform to the most common usage of KSampler to generate different images. In my fork, I added a way to pass values as command-like args in the exported .py file, but there isn't currently a good way to set a seed.

The best way I can think of would be to create a set seed would be to use a Primitive node that is not the vanilla ComfyUI primitive (which is simplified in the export to a value), set it to the value you want, and connect it to the seed for KSampler.

Here's what I mean:
workflow (1)
This uses the Primitive Integer from Crystools and the SaveAsScript fork.

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

2 participants