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

Hi cubiq, I have a idea but don't know how to achieve #19

Open
kelvinyoung opened this issue May 31, 2024 · 4 comments
Open

Hi cubiq, I have a idea but don't know how to achieve #19

kelvinyoung opened this issue May 31, 2024 · 4 comments

Comments

@kelvinyoung
Copy link

By using FaceAnalysis, I can get a image with Value & DIST on it, and also there is a string "Distance". Now I try to convert the string to a float type data that I can use a compare node to compare it with another float which I defined as a passing grade(e.g. 0.25), then if the float converted from "Distance" is large than the passing grade, that trigger the next same ksampler to excute or add a new queue.

@cubiq
Copy link
Owner

cubiq commented May 31, 2024

not sure I completely understand but that would require an IF/trigger node I guess

@kelvinyoung
Copy link
Author

not sure I completely understand but that would require an IF/trigger node I guess
the output [distance] is type of list, how can i convert it to string or float?

@cubiq
Copy link
Owner

cubiq commented Jun 3, 2024

you can use a SimpleMath node to convert it to Float. I believe a[0] should return a float but you can also do something like sum(a)/len(a) to get an average

@kelvinyoung
Copy link
Author

截屏2024-06-04 11 26 43 I did as you teach me, but it dose not work.

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