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

XYZPlot replaces prompts Prompts instead of appends #36

Open
LoganBarnett opened this issue Apr 24, 2024 · 0 comments
Open

XYZPlot replaces prompts Prompts instead of appends #36

LoganBarnett opened this issue Apr 24, 2024 · 0 comments

Comments

@LoganBarnett
Copy link
Contributor

Hi, thanks for the work on the project!

XYZPlot doesn't work with prompts like I'd expect them to. In my head, if I've already got a prompt, then the axis values for a prompt should be appended, not replaced. That said, I appreciate the generalized utility of XYZPlot and how it can be tied to any field. In most cases, a replace operation would be preferred (which XYZPlot does right now).

For prompts, I'd like to avoid human error and excessively large prompts in the XYZPlot node for doing replacing. In this way I'll have a sort of base prompt and the axis for that prompt will add its own values. I think this is what the screenshot is showing in the example of XYZPlot, but I haven't been able to reproduce it myself. When I inspected the data being sent to queue up the new prompt, it looks like my prompt was being overridden by one of the axis values entirely.

I have a branch at https://github.com/LoganBarnett/comfyui-browser/tree/debug-xyz-node which provides one means of doing this for XYZPlot by introducing an update_mode variable for each axis (I only cover X and Y at the moment). While it does function, I'm not convinced this is the ideal way to perform this task. I believe this requires each item in each prompt axis to have a comma to separate the prompt elements. Otherwise it's just a straight concatenation. For example, if you have a prompt of sunset on a beach and the axis values are 1girl; 1boy then you would get sunset on a beach1girl and sunset on a beach1boy. You could fix it with sunset on a beach, (note the added comma) and 1girl,; 1boy, (more commas, assuming you might use two or more axes for your prompt modifier.

I'm thinking maybe we should lean to have a substituter variable for each axis instead. You can leave it blank to replace the value. Then you would write a very semantic prompt like sunset on a beach, {person}, {time}, and your X axis could be 1girl; 1boy, and the Y axis could be day; night, and these would work very well together. You'd just have to give XYZPlot the additional {person} and {time} as x_substituter and y_substituter inputs, respectively. This approach will make the node a little larger / more noisy, but I think it gives us the power we are accustomed to seeing with ComfyUI (and XYZPlot) without adding magic that will later create a higher maintenance burden.

Thoughts?

I plan on implementing this, but I won't take offense if you'd rather see this done a different way and I've already arrived at a pull request before you could weigh in :)

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

1 participant