-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add 'Random Float' node <3 #4581
Conversation
does what it says on the tin :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this! A couple of comments:
- Keeping in line with the random integer node, I don't think we should have a seed input - this would be a used to generate a seed.
- Also, I know it's fun to have, but do you mind removing the attribution comment to help keep the codebase clean?
altered my random float node as requested by Millu, kept the seeded version as an alternate variant for those that would like to control the randomization seed :)
just seen this today. I altered the function as requested, but also added a random float with seed function in case folks would like it :) not sure if i need to do a new pr since its under a new commit? |
The commit gets automatically added to the PR! However, I'm not sure what the value of the node with a "seed" field is. By the nature of the node, a random float will be generated, and the value of surfacing a seed would be to have the same float, which renders the "Random Float" node redundant in the workflow. I think we should only add the random float without the seed and then go ahead and merge this. Also, instead of importing random, you can us |
yeah thats fine, i can always just use my seeded float node if i ever need it :D updated my commit to remove the seeded variant :) Didnt realize github updated in 'real time' when folks edited their comments etc, thats quite cool. anyway, as requested removed the random import. didnt realise np had it already lol (im a py nub) |
Looks good to me! |
After some thought, I think we actually do want our random nodes to have a seed value. If we provide the seed for all RNG (including the random int/float nodes), workflows are fully reproducible. I've created a feature request for this: #4700 |
does what it says on the tin :)
What type of PR is this? (check all applicable)
Have you discussed this change with the InvokeAI team?
Have you updated all relevant documentation?
Description
Adds a random float node to the math category