Skip to content

Commit b3ee906

Browse files
Mary Hippmaryhipp
authored andcommitted
add prompt validation to imagen3 graph
1 parent 5d69e90 commit b3ee906

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const buildImagen3Graph = async (state: RootState, manager: CanvasManager
3434
const { positivePrompt, negativePrompt } = selectPresetModifiedPrompts(state);
3535

3636
assert(isImagen3AspectRatioID(bbox.aspectRatio.id), 'Imagen3 does not support this aspect ratio');
37+
assert(positivePrompt.length > 0, 'Imagen3 requires positive prompt to have at least one character');
3738

3839
const is_intermediate = canvasSettings.sendToCanvas;
3940
const board = canvasSettings.sendToCanvas ? undefined : getBoardField(state);

0 commit comments

Comments
 (0)