mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix: IP Adapter method not being recalled
This commit is contained in:
parent
8426f1e7b2
commit
cd76a31a8f
@ -369,6 +369,10 @@ const parseIPAdapter: MetadataParseFunc<IPAdapterConfigMetadata> = async (metada
|
|||||||
.nullish()
|
.nullish()
|
||||||
.catch(null)
|
.catch(null)
|
||||||
.parse(await getProperty(metadataItem, 'weight'));
|
.parse(await getProperty(metadataItem, 'weight'));
|
||||||
|
const method = zIPAdapterField.shape.method
|
||||||
|
.nullish()
|
||||||
|
.catch(null)
|
||||||
|
.parse(await getProperty(metadataItem, 'method'));
|
||||||
const begin_step_percent = zIPAdapterField.shape.begin_step_percent
|
const begin_step_percent = zIPAdapterField.shape.begin_step_percent
|
||||||
.nullish()
|
.nullish()
|
||||||
.catch(null)
|
.catch(null)
|
||||||
@ -386,7 +390,7 @@ const parseIPAdapter: MetadataParseFunc<IPAdapterConfigMetadata> = async (metada
|
|||||||
clipVisionModel: 'ViT-H',
|
clipVisionModel: 'ViT-H',
|
||||||
controlImage: image?.image_name ?? null,
|
controlImage: image?.image_name ?? null,
|
||||||
weight: weight ?? initialIPAdapter.weight,
|
weight: weight ?? initialIPAdapter.weight,
|
||||||
method: 'full',
|
method: method ?? initialIPAdapter.method,
|
||||||
beginStepPct: begin_step_percent ?? initialIPAdapter.beginStepPct,
|
beginStepPct: begin_step_percent ?? initialIPAdapter.beginStepPct,
|
||||||
endStepPct: end_step_percent ?? initialIPAdapter.endStepPct,
|
endStepPct: end_step_percent ?? initialIPAdapter.endStepPct,
|
||||||
};
|
};
|
||||||
|
@ -109,6 +109,7 @@ export const zIPAdapterField = z.object({
|
|||||||
image: zImageField,
|
image: zImageField,
|
||||||
ip_adapter_model: zModelIdentifierField,
|
ip_adapter_model: zModelIdentifierField,
|
||||||
weight: z.number(),
|
weight: z.number(),
|
||||||
|
method: z.enum(['full', 'style', 'composition']),
|
||||||
begin_step_percent: z.number().optional(),
|
begin_step_percent: z.number().optional(),
|
||||||
end_step_percent: z.number().optional(),
|
end_step_percent: z.number().optional(),
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user