mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix type issues related to change in LoRA type
This commit is contained in:
parent
71ceab9094
commit
e6de915c34
@ -39,7 +39,7 @@ export const addModelSelectedListener = () => {
|
|||||||
|
|
||||||
// handle incompatible loras
|
// handle incompatible loras
|
||||||
forEach(state.lora.loras, (lora, id) => {
|
forEach(state.lora.loras, (lora, id) => {
|
||||||
if (lora.base !== newBaseModel) {
|
if (lora.model.base !== newBaseModel) {
|
||||||
dispatch(loraRemoved(id));
|
dispatch(loraRemoved(id));
|
||||||
modelsCleared += 1;
|
modelsCleared += 1;
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ export const addModelsLoadedListener = () => {
|
|||||||
const loras = getState().lora.loras;
|
const loras = getState().lora.loras;
|
||||||
|
|
||||||
forEach(loras, (lora, id) => {
|
forEach(loras, (lora, id) => {
|
||||||
const isLoRAAvailable = some(action.payload.entities, (m) => m?.key === lora?.key);
|
const isLoRAAvailable = some(action.payload.entities, (m) => m?.key === lora?.model.key);
|
||||||
|
|
||||||
if (isLoRAAvailable) {
|
if (isLoRAAvailable) {
|
||||||
return;
|
return;
|
||||||
|
@ -18,7 +18,7 @@ export const LoRAList = memo(() => {
|
|||||||
return (
|
return (
|
||||||
<Flex flexWrap="wrap" gap={2}>
|
<Flex flexWrap="wrap" gap={2}>
|
||||||
{lorasArray.map((lora) => (
|
{lorasArray.map((lora) => (
|
||||||
<LoRACard key={lora.key} lora={lora} />
|
<LoRACard key={lora.model.key} lora={lora} />
|
||||||
))}
|
))}
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
@ -40,7 +40,8 @@ export const addLoRAsToGraph = (
|
|||||||
const loraMetadata: CoreMetadataInvocation['loras'] = [];
|
const loraMetadata: CoreMetadataInvocation['loras'] = [];
|
||||||
|
|
||||||
enabledLoRAs.forEach((lora) => {
|
enabledLoRAs.forEach((lora) => {
|
||||||
const { key, weight } = lora;
|
const { weight } = lora;
|
||||||
|
const { key } = lora.model;
|
||||||
const currentLoraNodeId = `${LORA_LOADER}_${key}`;
|
const currentLoraNodeId = `${LORA_LOADER}_${key}`;
|
||||||
|
|
||||||
const loraLoaderNode: LoraLoaderInvocation = {
|
const loraLoaderNode: LoraLoaderInvocation = {
|
||||||
|
@ -58,7 +58,8 @@ export const addSDXLLoRAsToGraph = (
|
|||||||
let currentLoraIndex = 0;
|
let currentLoraIndex = 0;
|
||||||
|
|
||||||
enabledLoRAs.forEach((lora) => {
|
enabledLoRAs.forEach((lora) => {
|
||||||
const { key, weight } = lora;
|
const { weight } = lora;
|
||||||
|
const { key } = lora.model;
|
||||||
const currentLoraNodeId = `${LORA_LOADER}_${key}`;
|
const currentLoraNodeId = `${LORA_LOADER}_${key}`;
|
||||||
|
|
||||||
const loraLoaderNode: SDXLLoraLoaderInvocation = {
|
const loraLoaderNode: SDXLLoraLoaderInvocation = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user