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
8faefa89fe
commit
58ef6dc6ce
@ -39,7 +39,7 @@ export const addModelSelectedListener = () => {
|
||||
|
||||
// handle incompatible loras
|
||||
forEach(state.lora.loras, (lora, id) => {
|
||||
if (lora.base !== newBaseModel) {
|
||||
if (lora.model.base !== newBaseModel) {
|
||||
dispatch(loraRemoved(id));
|
||||
modelsCleared += 1;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ export const addModelsLoadedListener = () => {
|
||||
const loras = getState().lora.loras;
|
||||
|
||||
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) {
|
||||
return;
|
||||
|
@ -18,7 +18,7 @@ export const LoRAList = memo(() => {
|
||||
return (
|
||||
<Flex flexWrap="wrap" gap={2}>
|
||||
{lorasArray.map((lora) => (
|
||||
<LoRACard key={lora.key} lora={lora} />
|
||||
<LoRACard key={lora.model.key} lora={lora} />
|
||||
))}
|
||||
</Flex>
|
||||
);
|
||||
|
@ -40,7 +40,8 @@ export const addLoRAsToGraph = (
|
||||
const loraMetadata: CoreMetadataInvocation['loras'] = [];
|
||||
|
||||
enabledLoRAs.forEach((lora) => {
|
||||
const { key, weight } = lora;
|
||||
const { weight } = lora;
|
||||
const { key } = lora.model;
|
||||
const currentLoraNodeId = `${LORA_LOADER}_${key}`;
|
||||
|
||||
const loraLoaderNode: LoraLoaderInvocation = {
|
||||
|
@ -58,7 +58,8 @@ export const addSDXLLoRAsToGraph = (
|
||||
let currentLoraIndex = 0;
|
||||
|
||||
enabledLoRAs.forEach((lora) => {
|
||||
const { key, weight } = lora;
|
||||
const { weight } = lora;
|
||||
const { key } = lora.model;
|
||||
const currentLoraNodeId = `${LORA_LOADER}_${key}`;
|
||||
|
||||
const loraLoaderNode: SDXLLoraLoaderInvocation = {
|
||||
|
Loading…
Reference in New Issue
Block a user