mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
parent
106674175c
commit
55d7d9cc75
@ -487,26 +487,19 @@ const isValidIPAdapter = (ipa: IPAdapterConfigV2, base: BaseModelType): boolean
|
|||||||
};
|
};
|
||||||
|
|
||||||
const isValidLayer = (layer: Layer, base: BaseModelType) => {
|
const isValidLayer = (layer: Layer, base: BaseModelType) => {
|
||||||
|
if (!layer.isEnabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (isControlAdapterLayer(layer)) {
|
if (isControlAdapterLayer(layer)) {
|
||||||
if (!layer.isEnabled) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return isValidControlAdapter(layer.controlAdapter, base);
|
return isValidControlAdapter(layer.controlAdapter, base);
|
||||||
}
|
}
|
||||||
if (isIPAdapterLayer(layer)) {
|
if (isIPAdapterLayer(layer)) {
|
||||||
if (!layer.isEnabled) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return isValidIPAdapter(layer.ipAdapter, base);
|
return isValidIPAdapter(layer.ipAdapter, base);
|
||||||
}
|
}
|
||||||
if (isInitialImageLayer(layer)) {
|
if (isInitialImageLayer(layer)) {
|
||||||
if (!layer.isEnabled) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!layer.image) {
|
if (!layer.image) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
if (isRegionalGuidanceLayer(layer)) {
|
if (isRegionalGuidanceLayer(layer)) {
|
||||||
const hasTextPrompt = Boolean(layer.positivePrompt || layer.negativePrompt);
|
const hasTextPrompt = Boolean(layer.positivePrompt || layer.negativePrompt);
|
||||||
|
Loading…
Reference in New Issue
Block a user