mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(ui): ensure clip vision model is set correctly for FLUX IP Adapters
This commit is contained in:
@@ -66,6 +66,9 @@ export const selectDefaultIPAdapter = createSelector(
|
|||||||
const ipAdapter = deepClone(initialIPAdapter);
|
const ipAdapter = deepClone(initialIPAdapter);
|
||||||
if (model) {
|
if (model) {
|
||||||
ipAdapter.model = zModelIdentifierField.parse(model);
|
ipAdapter.model = zModelIdentifierField.parse(model);
|
||||||
|
if (model.base === 'flux') {
|
||||||
|
ipAdapter.clipVisionModel = 'ViT-L';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ipAdapter;
|
return ipAdapter;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,10 @@ const addIPAdapter = (entity: CanvasReferenceImageState, g: Graph, collector: In
|
|||||||
let ipAdapterNode: Invocation<'flux_ip_adapter' | 'ip_adapter'>;
|
let ipAdapterNode: Invocation<'flux_ip_adapter' | 'ip_adapter'>;
|
||||||
|
|
||||||
if (model.base === 'flux') {
|
if (model.base === 'flux') {
|
||||||
assert(clipVisionModel === 'ViT-L', 'ViT-L is the only supported CLIP Vision model for FLUX IP adapter');
|
assert(
|
||||||
|
clipVisionModel === 'ViT-L',
|
||||||
|
`ViT-L is the only supported CLIP Vision model for FLUX IP adapter, got ${clipVisionModel}`
|
||||||
|
);
|
||||||
ipAdapterNode = g.addNode({
|
ipAdapterNode = g.addNode({
|
||||||
id: `ip_adapter_${id}`,
|
id: `ip_adapter_${id}`,
|
||||||
type: 'flux_ip_adapter',
|
type: 'flux_ip_adapter',
|
||||||
|
|||||||
Reference in New Issue
Block a user