mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-01-14 22:18:16 -05:00
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.
This commit is contained in:
@@ -106,10 +106,12 @@ export const getInfill = (
|
||||
}
|
||||
|
||||
if (infillMethod === 'color') {
|
||||
const { a, ...rgb } = infillColorValue;
|
||||
const color = { ...rgb, a: Math.round(a * 255) };
|
||||
return g.addNode({
|
||||
id: 'infill_rgba',
|
||||
type: 'infill_rgba',
|
||||
color: infillColorValue,
|
||||
color,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user