Updated to pull threshold from an existing image even if 0 (#2051)

Addresses #2049 but not other cases where the stored value is 0 (e.g. perlin noise). This should be investigated more throughly.
This commit is contained in:
Jonathan 2022-12-17 18:03:09 -06:00 committed by GitHub
parent dc39f8d6a7
commit 51613525a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,8 +236,11 @@ export const optionsSlice = createSlice({
if (sampler) state.sampler = sampler;
if (steps) state.steps = steps;
if (cfg_scale) state.cfgScale = cfg_scale;
if (threshold) state.threshold = threshold;
if (typeof threshold === 'undefined') state.threshold = 0;
if (typeof threshold === 'undefined') {
state.threshold = 0;
} else {
state.threshold = threshold;
}
if (perlin) state.perlin = perlin;
if (typeof perlin === 'undefined') state.perlin = 0;
if (typeof seamless === 'boolean') state.seamless = seamless;