Loop Engine (internal):
PixaromaLoopEngine is the internal driver for Pixaroma’s Loop Start and Loop End workflow. Loop End creates it automatically; you do not need to place it yourself. After a round of the loop, the engine checks whether more rounds are due. If so, it recreates the nodes inside the loop and runs them again with the next round’s position and the values carried forward from the previous round. When the loop is complete, it passes along the final carried values. This lets you build a workflow that repeats a sequence of image-making steps while preserving information from one round to the next.
Loop Engine (internal) Input Parameters:
loop
A required FLOW_CONTROL connection that identifies the Loop Start side of the workflow. The engine uses this connection to find the loop boundary and determine which nodes belong in subsequent rounds. It expects a real loop link supplied by the Loop Start and Loop End workflow. If the connection is absent or invalid when the engine runs, it stops and returns empty values instead of attempting to repeat the workflow. No numeric minimum, maximum, default, or selectable options are defined for this input.
index_in
A required input representing the current round’s position. The engine converts it to a whole number and adds one to decide which round comes next. If that next position has reached the total number of rounds, the engine finishes; otherwise, it starts another round. This value normally comes from Loop Start rather than being set manually. The interface accepts any type, but the value must be convertible to an integer for the loop to advance. No minimum, maximum, default, or selectable options are defined.
total
A required input representing the number of rounds. The engine converts it to a whole number and compares it with the next round’s position to decide whether to continue or finish. This value normally comes from Loop Start. The interface accepts any type, but a value that cannot be converted to an integer causes an error. No minimum, maximum, default, or selectable options are defined in this node’s interface.
value1
An optional value carried from the current round into the next round and eventually returned through value1. You can use this channel for information that your loop needs to retain or update, such as an intermediate result. It accepts any type. If it is not supplied, the engine uses None for this channel; no other default, minimum, maximum, or selectable options are defined.
value2
An optional, independent channel for a second value carried between rounds and returned through value2. It lets your workflow preserve another intermediate result without combining it with value1. It accepts any type. If it is not supplied, the engine uses None; no other default, minimum, maximum, or selectable options are defined.
value3
An optional channel for a third carried value. The engine passes its current value into the next round, or returns it through value3 when the loop finishes. It accepts any type. If it is not supplied, the engine uses None; no other default, minimum, maximum, or selectable options are defined.
value4
An optional channel for a fourth carried value, kept separate from the other value channels as the workflow repeats. Its final value appears through value4. It accepts any type. If it is not supplied, the engine uses None; no other default, minimum, maximum, or selectable options are defined.
value5
An optional channel for a fifth carried value. Use it when your repeated workflow needs to retain another piece of information between rounds; the final value appears through value5. It accepts any type. If it is not supplied, the engine uses None; no other default, minimum, maximum, or selectable options are defined.
Loop Engine (internal) Output Parameters:
value1
The first carried value, in the first output socket. When the loop is finished, this is the final value received on the corresponding input, unchanged by the engine itself. While another round is due, the output leads to the result of the recreated loop workflow. Its type depends on what the workflow carries, and it can be None if no value was supplied.
value2
The second carried value, in the second output socket. It represents the final result of the second value channel when the loop completes, or the corresponding result from the continuing loop workflow while more rounds are due. The engine does not assign it a particular meaning or data type; that depends on what you connect to this channel. An unsupplied value can be None.
value3
The third carried value, in the third output socket. It lets you retrieve a third piece of information retained across rounds. At completion, the engine returns the value supplied on the corresponding input without changing it. Its type depends on the connected workflow, and it can be None.
value4
The fourth carried value, in the fourth output socket. It provides the result of the fourth independent value channel after the repeated workflow finishes. The engine carries the value forward between rounds but does not otherwise interpret it. Its type depends on your workflow, and it can be None if left unsupplied.
value5
The fifth carried value, in the fifth output socket. It provides the final value of the fifth channel, allowing a separate result to travel through the repeated workflow alongside the others. The engine does not impose a specific data type or transform the completed value. It can be None if no value was supplied.
Loop Engine (internal) Usage Tips:
- Build the repetition with Loop Start and Loop End, and let Loop End create PixaromaLoopEngine automatically. Placing the engine by hand does not establish the loop connection it needs.
- Set the number of rounds at Loop Start to the amount your task actually requires. Each additional round causes the contained workflow to run again, so keeping the count appropriate avoids unnecessary work.
- Connect only the carried-value channels you need, and keep each channel’s role consistent across rounds. For example, use one channel for an evolving image result and another for separate information you need later.
- Ensure the round position and total can be read as whole numbers. The engine advances the position by one and compares it with the total; an unreadable total stops execution with an error.
- If you need a Preview or Save node to update on every round, place it within the nodes enclosed by Loop Start and Loop End. The engine attempts to include enclosed output nodes in each round, although a failed output-node scan may leave them updating only on the final round.
Loop Engine (internal) Common Errors and Solutions:
Loop End Pixaroma: 'total' (the number of rounds) on Loop Start must be a whole number.
- Explanation: The engine could not convert the supplied
totalvalue to an integer, so it stops instead of treating the loop as a single round. - Solution: Check the number-of-rounds value on Loop Start and any connection feeding it. Supply a value that can be read as a whole number.
No error message, but all five outputs are None
- Explanation: If the engine has no valid
loopconnection, it deliberately returns fiveNonevalues. This can happen when it is placed by hand or its loop wiring is missing. - Solution: Use Loop Start and Loop End to create the loop, and allow Loop End to spawn the engine. Check that the loop connection has not been broken.
No error message, but the loop stops instead of advancing
- Explanation: If
index_incannot be converted to an integer, the engine returns the current carried values rather than risking endless repetition. The same visible result is expected when the next round’s position has reachedtotal. - Solution: Check that the round position supplied by Loop Start is readable as a whole number. If it is valid, review the total number of rounds to confirm that another round is actually due.
[Pixaroma Loop] Could not scan for output nodes inside the loop; a Preview or Save placed between Loop Start and Loop End may only update on the final round.
- Explanation: The engine could not complete its scan for enclosed output nodes. The loop can still iterate, but a Preview or Save node inside it may not update on every round.
- Solution: Check whether the loop itself finishes and whether Preview or Save updates only at the end. If every-round output is essential, inspect the enclosed output-node connections and the environment’s log for the underlying scan issue.
An expected output is None
- Explanation: Each optional
value1throughvalue5channel usesNonewhen no value is supplied. The engine does not create a result for an unused channel. - Solution: Connect the corresponding value channel in the loop and check that the preceding round provides the value you expect.
