Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfda7e0a

Browse files
3.0.1 - Pre-Release UI Fixes (invoke-ai#4001)
## What type of PR is this? (check all applicable)- [x] Feature## Have you discussed this change with the InvokeAI team?- [x] Yes ## Description- Update the Aspect Ratio tags to show the aspect ratio values ratherthan Wide / Square and etc.- Updated Lora Input to take values between -50 and 50 coz I found someLoRA that are actually trained to work until -25 and +15 too. So theseinput caps should mostly suffice. If there's ever a LoRA that goesbonkers on that, we can change it.- Fixed LoRA's being sorted the wrong way in Lora Select.- Fixed Embeddings being sorted the wrong way in Embedding Select.## Related Tickets & Documents<!--For pull requests that relate or close an issue, please include thembelow. For example having the text: "closesinvoke-ai#1234" would connect the currentpullrequest to issue 1234. And when we merge the pull request, Github willautomatically close the issue.-->- Related Issue #- Closes ### QA Instructions, Screenshots, Recordings<!-- Please provide steps on how to test changes, any hardware or software specifications as well as any other pertinent information. -->## Added/updated tests?- [ ] Yes- [ ] No : _please replace this line with details on why tests have not been included_## [optional] Are there any post deployment tasks we need to perform?
2 parents761fc4b +9e9dce4 commitfda7e0a

File tree

5 files changed

+24
-9
lines changed

5 files changed

+24
-9
lines changed

‎invokeai/frontend/web/src/common/components/IAISlider.tsx‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ const IAISlider = (props: IAIFullSliderProps) => {
114114
setLocalInputValue(value);
115115
},[value]);
116116

117+
constnumberInputMin=useMemo(
118+
()=>(sliderNumberInputProps?.min ?sliderNumberInputProps.min :min),
119+
[min,sliderNumberInputProps?.min]
120+
);
121+
117122
constnumberInputMax=useMemo(
118123
()=>(sliderNumberInputProps?.max ?sliderNumberInputProps.max :max),
119124
[max,sliderNumberInputProps?.max]
@@ -129,24 +134,23 @@ const IAISlider = (props: IAIFullSliderProps) => {
129134
consthandleInputBlur=useCallback(
130135
(e:FocusEvent<HTMLInputElement>)=>{
131136
if(e.target.value===''){
132-
e.target.value=String(min);
137+
e.target.value=String(numberInputMin);
133138
}
134139
constclamped=clamp(
135140
isInteger
136141
?Math.floor(Number(e.target.value))
137142
:Number(localInputValue),
138-
min,
143+
numberInputMin,
139144
numberInputMax
140145
);
141146
constquantized=roundDownToMultiple(clamped,step);
142147
onChange(quantized);
143148
setLocalInputValue(quantized);
144149
},
145-
[isInteger,localInputValue,min,numberInputMax,onChange,step]
150+
[isInteger,localInputValue,numberInputMin,numberInputMax,onChange,step]
146151
);
147152

148153
consthandleInputChange=useCallback((v:number|string)=>{
149-
console.log('input');
150154
setLocalInputValue(v);
151155
},[]);
152156

@@ -310,7 +314,7 @@ const IAISlider = (props: IAIFullSliderProps) => {
310314

311315
{withInput&&(
312316
<NumberInput
313-
min={min}
317+
min={numberInputMin}
314318
max={numberInputMax}
315319
step={step}
316320
value={localInputValue}

‎invokeai/frontend/web/src/features/embedding/components/ParamEmbeddingPopover.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ const ParamEmbeddingPopover = (props: Props) => {
5757
});
5858
});
5959

60+
// Sort Alphabetically
61+
data.sort((a,b)=>
62+
a.label&&b.label ?(a.label?.localeCompare(b.label) ?-1 :1) :-1
63+
);
64+
6065
returndata.sort((a,b)=>(a.disabled&&!b.disabled ?1 :-1));
6166
},[embeddingQueryData,currentMainModel?.base_model]);
6267

‎invokeai/frontend/web/src/features/lora/components/ParamLora.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const ParamLora = (props: Props) => {
4848
handleReset={handleReset}
4949
withSliderMarks
5050
sliderMarks={[-1,0,1,2]}
51+
sliderNumberInputProps={{min:-50,max:50}}
5152
/>
5253
<IAIIconButton
5354
size="sm"

‎invokeai/frontend/web/src/features/lora/components/ParamLoraSelect.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ const ParamLoRASelect = () => {
5454
});
5555
});
5656

57-
returndata.sort((a,b)=>(a.disabled&&!b.disabled ?1 :-1));
57+
// Sort Alphabetically
58+
data.sort((a,b)=>
59+
a.label&&b.label ?(a.label?.localeCompare(b.label) ?1 :-1) :-1
60+
);
61+
62+
returndata.sort((a,b)=>(a.disabled&&!b.disabled ?-1 :1));
5863
},[loras,loraModels,currentMainModel?.base_model]);
5964

6065
consthandleChange=useCallback(

‎invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamAspectRatio.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { activeTabNameSelector } from '../../../../ui/store/uiSelectors';
77

88
constaspectRatios=[
99
{name:'Free',value:null},
10-
{name:'Portrait',value:0.67/1},
11-
{name:'Wide',value:16/9},
12-
{name:'Square',value:1/1},
10+
{name:'2:3',value:2/3},
11+
{name:'16:9',value:16/9},
12+
{name:'1:1',value:1/1},
1313
];
1414

1515
exportdefaultfunctionParamAspectRatio(){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp