mirror of
https://github.com/invoke-ai/InvokeAI
synced 2026-05-02 19:52:08 +02: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:
parent
3583d03b70
commit
3947d4a165
@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user