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

[BUG] - SDParameterGenerator doesn't load the seed value from previously generated images #44

Closed
alessandroperilli opened this issue Jan 13, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@alessandroperilli
Copy link

alessandroperilli commented Jan 13, 2024

Description

If I generate an image with a workflow that includes the SDParameterGenerator node (like the AP Workflow or the default ComfyUI workflow in the image below), and I later drag that image into the ComfyUI canvas, or Load it via the floating menu, all generation parameters are correctly loaded except the seed value. That remains to -1.

Reproduction steps

  1. Load the default ComfyUI workflow.
  2. Convert any control in the KSampler from widget to input
  3. Link the KSampler input to the corresponding output in the SDParameterGenerator node
  4. Generate a couple of images
  5. Load the before last image and notice that the seed remains at -1

Image file

Screenshot 2024-01-13 at 10 04 46
@alessandroperilli alessandroperilli added the bug Something isn't working label Jan 13, 2024
@receyuki
Copy link
Owner

This is not a bug. Since I borrowed the entire seed generator from rgthree, my understanding is that it works by storing the seed in a location that is not part of the workflow. Therefore, to implement this feature technically, I would need to rewrite rgthree’s seed generator (something I don’t believe is worthwhile doing).
Alternatively, you could ask rgthree if he would be interested in modifying it to suit your preferences, and then I could learn from his updated code lol.

@alessandroperilli
Copy link
Author

I'd be happy to do that, but are we sure? I perfectly remembered that dragging a previously-generated image into the ComfyUI canvas would load the seed number inside the SDParametersGenerator node without issues.
And I have one AP Workflow user who tells me it used to work fine with AP Workflow 6.0 and now it's not working with 7.0.

Given that I changed absolutely nothing in the workflow about the seed in the transition from 6 to 7, and given the behaviour I just described above, I thought something changed in the node itself.

I have no idea how this feature is implemented. Is it possible that @rgthree changed something in his custom node suite and that impacted the behavior of your SDParametersGenerator node? (Sorry if it's a stupid question)

@alessandroperilli
Copy link
Author

It's working now... I just tried again and the seed loads without issues, as usual. I have no idea what's happening :)

@alessandroperilli
Copy link
Author

I'm closing this for the time being.

@receyuki
Copy link
Owner

You're right, I will go over rgthree's code again carefully. His code works perfectly, the problem should be with my modifications.

@receyuki receyuki reopened this Jan 14, 2024
receyuki added a commit that referenced this issue Jan 15, 2024
…queue button #45

Fix the `Parameter Generator` node doesn't load seed value from generated images #44
Update seedGen.js to rgthree's latest code
@alessandroperilli
Copy link
Author

Thank you for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants