Skip to content

Commit d099924

Browse files
Merge branch 'main' into bugfix/run-on-3.9
2 parents 10e4d8b + 94473c5 commit d099924

File tree

4 files changed

+10
-23
lines changed

4 files changed

+10
-23
lines changed

invokeai/app/invocations/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class SDXLLoraLoaderInvocation(BaseInvocation):
249249
"""Apply selected lora to unet and text_encoder."""
250250

251251
lora: LoRAModelField = InputField(description=FieldDescriptions.lora_model, input=Input.Direct, title="LoRA")
252-
weight: float = Field(default=0.75, description=FieldDescriptions.lora_weight)
252+
weight: float = InputField(default=0.75, description=FieldDescriptions.lora_weight)
253253
unet: Optional[UNetField] = Field(
254254
default=None, description=FieldDescriptions.unet, input=Input.Connection, title="UNET"
255255
)

invokeai/backend/util/mps_fixes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import math
2-
import torch
3-
import diffusers
42

3+
import diffusers
4+
import torch
55

66
if torch.backends.mps.is_available():
77
torch.empty = torch.zeros

invokeai/frontend/web/src/features/controlNet/components/ControlNetImagePreview.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,22 @@ const ControlNetImagePreview = ({ isSmall, controlNet }: Props) => {
104104
]);
105105

106106
const handleSetControlImageToDimensions = useCallback(() => {
107-
if (!processedControlImage) {
107+
if (!controlImage) {
108108
return;
109109
}
110110

111111
if (activeTabName === 'unifiedCanvas') {
112112
dispatch(
113113
setBoundingBoxDimensions({
114-
width: processedControlImage.width,
115-
height: processedControlImage.height,
114+
width: controlImage.width,
115+
height: controlImage.height,
116116
})
117117
);
118118
} else {
119-
dispatch(setWidth(processedControlImage.width));
120-
dispatch(setHeight(processedControlImage.height));
119+
dispatch(setWidth(controlImage.width));
120+
dispatch(setHeight(controlImage.height));
121121
}
122-
}, [processedControlImage, activeTabName, dispatch]);
122+
}, [controlImage, activeTabName, dispatch]);
123123

124124
const handleMouseEnter = useCallback(() => {
125125
setIsMouseOverImage(true);

invokeai/frontend/web/src/features/nodes/types/types.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { store } from 'app/store/store';
21
import {
32
SchedulerParam,
43
zBaseModel,
@@ -10,14 +9,14 @@ import { keyBy } from 'lodash-es';
109
import { OpenAPIV3 } from 'openapi-types';
1110
import { RgbaColor } from 'react-colorful';
1211
import { Node } from 'reactflow';
13-
import { JsonObject } from 'type-fest';
1412
import { Graph, ImageDTO, _InputField, _OutputField } from 'services/api/types';
1513
import {
1614
AnyInvocationType,
1715
AnyResult,
1816
ProgressImage,
1917
} from 'services/events/types';
2018
import { O } from 'ts-toolbelt';
19+
import { JsonObject } from 'type-fest';
2120
import { z } from 'zod';
2221

2322
export type NonNullableGraph = O.Required<Graph, 'nodes' | 'edges'>;
@@ -936,22 +935,10 @@ export const zWorkflow = z.object({
936935
});
937936

938937
export const zValidatedWorkflow = zWorkflow.transform((workflow) => {
939-
const nodeTemplates = store.getState().nodes.nodeTemplates;
940938
const { nodes, edges } = workflow;
941939
const warnings: WorkflowWarning[] = [];
942940
const invocationNodes = nodes.filter(isWorkflowInvocationNode);
943941
const keyedNodes = keyBy(invocationNodes, 'id');
944-
invocationNodes.forEach((node, i) => {
945-
const nodeTemplate = nodeTemplates[node.data.type];
946-
if (!nodeTemplate) {
947-
warnings.push({
948-
message: `Node "${node.data.label || node.data.id}" skipped`,
949-
issues: [`Unable to find template for type "${node.data.type}"`],
950-
data: node,
951-
});
952-
delete nodes[i];
953-
}
954-
});
955942
edges.forEach((edge, i) => {
956943
const sourceNode = keyedNodes[edge.source];
957944
const targetNode = keyedNodes[edge.target];

0 commit comments

Comments
 (0)