Skip to content

Commit 82d9bc9

Browse files
committed
fix variation seed showing up when it's not valid
1 parent b9ea144 commit 82d9bc9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Text2Image/T2IParamInput.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public void NormalizeSeeds()
168168
{
169169
Set(T2IParamTypes.Seed, Random.Shared.Next());
170170
}
171-
if (!TryGet(T2IParamTypes.VariationSeed, out long vseed) || vseed == -1)
171+
if (TryGet(T2IParamTypes.VariationSeed, out long vseed) && vseed == -1)
172172
{
173173
Set(T2IParamTypes.VariationSeed, Random.Shared.Next());
174174
}

src/wwwroot/js/genpage_params.js

+4
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ function getGenInput() {
321321
if (type.toggleable && !getRequiredElementById(`input_${type.id}_toggle`).checked) {
322322
continue;
323323
}
324+
if (type.feature_missing) {
325+
continue;
326+
}
324327
if (type.group && type.group.toggles && !getRequiredElementById(`input_group_content_${type.group.id}_toggle`).checked) {
325328
continue;
326329
}
@@ -415,6 +418,7 @@ function hideUnsupportableParams() {
415418
if (elem) {
416419
let box = findParentOfClass(elem, 'auto-input');
417420
let show = param.feature_flag == null || Object.values(backends_loaded).filter(b => b.features.includes(param.feature_flag)).length > 0;
421+
param.feature_missing = !show;
418422
if (show) {
419423
box.style.display = 'inline-block';
420424
}

0 commit comments

Comments
 (0)