diff --git a/invokeai/app/invocations/metadata.py b/invokeai/app/invocations/metadata.py index 58edfab711..bec1b0d9d5 100644 --- a/invokeai/app/invocations/metadata.py +++ b/invokeai/app/invocations/metadata.py @@ -33,7 +33,7 @@ class MetadataItemField(BaseModel): class LoRAMetadataField(BaseModel): """LoRA Metadata Field""" - lora: LoRAModelField = Field(description=FieldDescriptions.lora_model) + model: LoRAModelField = Field(description=FieldDescriptions.lora_model) weight: float = Field(description=FieldDescriptions.lora_weight) @@ -114,7 +114,7 @@ GENERATION_MODES = Literal[ ] -@invocation("core_metadata", title="Core Metadata", tags=["metadata"], category="metadata", version="1.0.1") +@invocation("core_metadata", title="Core Metadata", tags=["metadata"], category="metadata", version="1.1.1") class CoreMetadataInvocation(BaseInvocation): """Collects core generation metadata into a MetadataField""" diff --git a/invokeai/frontend/web/src/features/nodes/types/metadata.ts b/invokeai/frontend/web/src/features/nodes/types/metadata.ts index 132f9f781a..3a87e96da3 100644 --- a/invokeai/frontend/web/src/features/nodes/types/metadata.ts +++ b/invokeai/frontend/web/src/features/nodes/types/metadata.ts @@ -26,45 +26,3 @@ export type ModelMetadataItem = z.infer; export type VAEModelMetadataItem = z.infer; // #endregion -// #region CoreMetadata -export const zCoreMetadata = z - .object({ - app_version: z.string().nullish().catch(null), - generation_mode: z.string().nullish().catch(null), - created_by: z.string().nullish().catch(null), - positive_prompt: z.string().nullish().catch(null), - negative_prompt: z.string().nullish().catch(null), - width: z.number().int().nullish().catch(null), - height: z.number().int().nullish().catch(null), - seed: z.number().int().nullish().catch(null), - rand_device: z.string().nullish().catch(null), - cfg_scale: z.number().nullish().catch(null), - cfg_rescale_multiplier: z.number().nullish().catch(null), - steps: z.number().int().nullish().catch(null), - scheduler: z.string().nullish().catch(null), - clip_skip: z.number().int().nullish().catch(null), - model: zModelMetadataItem.nullish().catch(null), - controlnets: z.array(zControlNetMetadataItem).nullish().catch(null), - ipAdapters: z.array(zIPAdapterMetadataItem).nullish().catch(null), - t2iAdapters: z.array(zT2IAdapterMetadataItem).nullish().catch(null), - loras: z.array(zLoRAMetadataItem).nullish().catch(null), - vae: zVAEModelMetadataItem.nullish().catch(null), - strength: z.number().nullish().catch(null), - hrf_enabled: z.boolean().nullish().catch(null), - hrf_strength: z.number().nullish().catch(null), - hrf_method: z.string().nullish().catch(null), - init_image: z.string().nullish().catch(null), - positive_style_prompt: z.string().nullish().catch(null), - negative_style_prompt: z.string().nullish().catch(null), - refiner_model: zSDXLRefinerModelMetadataItem.nullish().catch(null), - refiner_cfg_scale: z.number().nullish().catch(null), - refiner_steps: z.number().int().nullish().catch(null), - refiner_scheduler: z.string().nullish().catch(null), - refiner_positive_aesthetic_score: z.number().nullish().catch(null), - refiner_negative_aesthetic_score: z.number().nullish().catch(null), - refiner_start: z.number().nullish().catch(null), - }) - .passthrough(); -export type CoreMetadata = z.infer; - -// #endregion diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/addLoRAsToGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/addLoRAsToGraph.ts index 5c47cf5c58..c49a0e19e3 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/addLoRAsToGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/addLoRAsToGraph.ts @@ -53,7 +53,7 @@ export const addLoRAsToGraph = ( }; loraMetadata.push({ - lora: { key }, + model: { key }, weight, }); diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/addSDXLLoRAstoGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/addSDXLLoRAstoGraph.ts index 54d1e2116d..36223391fe 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/addSDXLLoRAstoGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/addSDXLLoRAstoGraph.ts @@ -1,8 +1,6 @@ import type { RootState } from 'app/store/store'; -import type { LoRAMetadataItem } from 'features/nodes/types/metadata'; -import { zLoRAMetadataItem } from 'features/nodes/types/metadata'; import { filter, size } from 'lodash-es'; -import type { NonNullableGraph, SDXLLoraLoaderInvocation } from 'services/api/types'; +import type { CoreMetadataInvocation, NonNullableGraph, SDXLLoraLoaderInvocation } from 'services/api/types'; import { LORA_LOADER, @@ -36,7 +34,7 @@ export const addSDXLLoRAsToGraph = ( return; } - const loraMetadata: LoRAMetadataItem[] = []; + const loraMetadata: CoreMetadataInvocation['loras'] = []; // Handle Seamless Plugs const unetLoaderId = modelLoaderNodeId; @@ -70,12 +68,7 @@ export const addSDXLLoRAsToGraph = ( weight, }; - loraMetadata.push( - zLoRAMetadataItem.parse({ - lora: { key }, - weight, - }) - ); + loraMetadata.push({ model: { key }, weight }); // add to graph graph.nodes[currentLoraNodeId] = loraLoaderNode; diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.ts index beb13e4070..1d347ad222 100644 --- a/invokeai/frontend/web/src/services/api/schema.ts +++ b/invokeai/frontend/web/src/services/api/schema.ts @@ -4339,7 +4339,7 @@ export type components = { * @description The nodes in this graph */ nodes: { - [key: string]: components["schemas"]["RandomRangeInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["VaeLoaderInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["SDXLLoraLoaderInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["ClipSkipInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["ImageInverseLerpInvocation"]; + [key: string]: components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["VaeLoaderInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["SDXLLoraLoaderInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["ClipSkipInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["StringCollectionInvocation"]; }; /** * Edges @@ -4376,7 +4376,7 @@ export type components = { * @description The results of node executions */ results: { - [key: string]: components["schemas"]["VAEOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["String2Output"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["SDXLLoraLoaderOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["ClipSkipInvocationOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["LoraLoaderOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["FloatOutput"]; + [key: string]: components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["String2Output"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["ClipSkipInvocationOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["LoraLoaderOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["SDXLLoraLoaderOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["IPAdapterOutput"]; }; /** * Errors @@ -6675,7 +6675,7 @@ export type components = { */ LoRAMetadataField: { /** @description LoRA model to load */ - lora: components["schemas"]["LoRAModelField"]; + model: components["schemas"]["LoRAModelField"]; /** * Weight * @description The weight at which the LoRA is applied to each model