mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-13 20:15:04 -05:00
Reorder embedding options in PromptTriggerSelect component
Co-authored-by: kent <kent@invoke.ai>
This commit is contained in:
committed by
psychedelicious
parent
f3478a189a
commit
c10865c7ef
@@ -42,19 +42,6 @@ export const PromptTriggerSelect = memo(({ onSelect, onClose }: PromptTriggerSel
|
||||
const options = useMemo(() => {
|
||||
const _options: GroupBase<ComboboxOption>[] = [];
|
||||
|
||||
if (tiModels) {
|
||||
const embeddingOptions = tiModels
|
||||
.filter((ti) => ti.base === mainModelConfig?.base)
|
||||
.map((model) => ({ label: model.name, value: `<${model.name}>` }));
|
||||
|
||||
if (embeddingOptions.length > 0) {
|
||||
_options.push({
|
||||
label: t('prompt.compatibleEmbeddings'),
|
||||
options: embeddingOptions,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (loraModels) {
|
||||
const triggerPhraseOptions = loraModels
|
||||
.filter((lora) => map(addedLoRAs, (l) => l.model.key).includes(lora.key))
|
||||
@@ -74,6 +61,19 @@ export const PromptTriggerSelect = memo(({ onSelect, onClose }: PromptTriggerSel
|
||||
}
|
||||
}
|
||||
|
||||
if (tiModels) {
|
||||
const embeddingOptions = tiModels
|
||||
.filter((ti) => ti.base === mainModelConfig?.base)
|
||||
.map((model) => ({ label: model.name, value: `<${model.name}>` }));
|
||||
|
||||
if (embeddingOptions.length > 0) {
|
||||
_options.push({
|
||||
label: t('prompt.compatibleEmbeddings'),
|
||||
options: embeddingOptions,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (mainModelConfig && isNonRefinerMainModelConfig(mainModelConfig) && mainModelConfig.trigger_phrases?.length) {
|
||||
_options.push({
|
||||
label: t('modelManager.mainModelTriggerPhrases'),
|
||||
|
||||
Reference in New Issue
Block a user