Skip to content

Commit

Permalink
Updated to pull threshold from an existing image even if 0 (#2051)
Browse files Browse the repository at this point in the history
Addresses #2049 but not other cases where the stored value is 0 (e.g. perlin noise). This should be investigated more throughly.
  • Loading branch information
JPPhoto committed Dec 18, 2022
1 parent dc39f8d commit 5161352
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/src/features/options/store/optionsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5161352

Please sign in to comment.