Skip to content

Commit 6ea3c8d

Browse files
fix(ui): normalize infill alpha to 0-255 when building infill nodes
The browser/UI uses float 0-1 for alpha, while backend uses 0-255. We need to normalize the value when building the infill nodes for outpaint.
1 parent 6a24594 commit 6ea3c8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

invokeai/frontend/web/src/features/nodes/util/graph/graphBuilderUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,12 @@ export const getInfill = (
106106
}
107107

108108
if (infillMethod === 'color') {
109+
const { a, ...rgb } = infillColorValue;
110+
const color = { ...rgb, a: Math.round(a * 255) };
109111
return g.addNode({
110112
id: 'infill_rgba',
111113
type: 'infill_rgba',
112-
color: infillColorValue,
114+
color,
113115
});
114116
}
115117

0 commit comments

Comments
 (0)