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

Text Load Line From File - Index is sampled when node is run not when prompt is queued. #534

Open
kendrick90 opened this issue Jan 1, 2025 · 1 comment

Comments

@kendrick90
Copy link

Text Load Line From File - Index is sampled when node is run not when prompt is queued. In other words if I manually click through the indexes and queue the prompts one at a time, by the time the node is ran the index is set to the last one so I get lots of generations with the last index instead of what the index was at when I clicked queue prompt. If anyone has tips for how to queue prompts sequentially like this I would appreciate it.

@andreszs
Copy link
Contributor

Your issue is rather confusing, considering that the index from the Load Line From File node may not auto-set itself. The index is an input, and your problem would be in node that is providing such value.

That being said, here's a sample workflow that loads lines from files sequentially. Each time the workflow is queued, the index receives a value increased by 1 compared to its previous value, allowing to get a prompt from each line of the text file provided.

To reset the counter and restart from the first line, you set the Logic Boolean node value to 1, queue a single workflow, and set it back to 0 for normal operation.

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