Skip to content

Commit ff897f7

Browse files
Mary Hippmaryhipp
authored andcommitted
send the list of reference images reversed to chatGPT so it matches displayed order
1 parent 3d29c99 commit ff897f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

invokeai/frontend/web/src/features/nodes/util/graph/generation/buildChatGPT4oGraph.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export const buildChatGPT4oGraph = async (state: RootState, manager: CanvasManag
4444
const validRefImages = canvas.referenceImages.entities
4545
.filter((entity) => entity.isEnabled)
4646
.filter((entity) => isChatGPT4oReferenceImageConfig(entity.ipAdapter))
47-
.filter((entity) => getGlobalReferenceImageWarnings(entity, model).length === 0);
47+
.filter((entity) => getGlobalReferenceImageWarnings(entity, model).length === 0)
48+
.toReversed(); // sends them in order they are displayed in the list
4849

4950
let reference_images: ImageField[] | undefined = undefined;
5051

0 commit comments

Comments
 (0)