Skip to content

Commit

Permalink
Merge branch 'main' into maryhipp/workflow-thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
maryhipp authored Feb 28, 2025
2 parents c81096f + 84c9ecc commit 59cc95f
Show file tree
Hide file tree
Showing 23 changed files with 414 additions and 99 deletions.
2 changes: 2 additions & 0 deletions invokeai/frontend/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
"idb-keyval": "^6.2.1",
"jsondiffpatch": "^0.6.0",
"konva": "^9.3.15",
"linkify-react": "^4.2.0",
"linkifyjs": "^4.2.0",
"lodash-es": "^4.17.21",
"lru-cache": "^11.0.1",
"mtwist": "^1.0.2",
Expand Down
20 changes: 20 additions & 0 deletions invokeai/frontend/web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

235 changes: 208 additions & 27 deletions invokeai/frontend/web/public/locales/fr.json

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions invokeai/frontend/web/public/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -2277,11 +2277,7 @@
"watchUiUpdatesOverview": "Guarda le novità dell'interfaccia",
"items": [
"Impostazioni predefinite VRAM migliorate",
"Cancellazione della cache del modello su richiesta",
"Compatibilità estesa FLUX LoRA",
"Filtro Regola Immagine su Tela",
"Annulla tutto tranne l'elemento della coda corrente",
"Copia da e incolla sulla Tela"
"Cancellazione della cache del modello su richiesta"
]
},
"system": {
Expand Down
91 changes: 79 additions & 12 deletions invokeai/frontend/web/public/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,13 @@
"redo": {
"title": "やり直し"
},
"title": "ワークフロー"
"title": "ワークフロー",
"pasteSelection": {
"title": "ペースト"
},
"copySelection": {
"title": "コピー"
}
},
"app": {
"toggleLeftPanel": {
Expand Down Expand Up @@ -390,7 +396,10 @@
"desc": "カーソルをポジティブプロンプト欄に移動します。"
}
},
"hotkeys": "ホットキー"
"hotkeys": "ホットキー",
"gallery": {
"title": "ギャラリー"
}
},
"modelManager": {
"modelManager": "モデルマネージャ",
Expand Down Expand Up @@ -452,7 +461,8 @@
"loraModels": "LoRA",
"edit": "編集",
"install": "インストール",
"huggingFacePlaceholder": "owner/model-name"
"huggingFacePlaceholder": "owner/model-name",
"variant": "Variant"
},
"parameters": {
"images": "画像",
Expand Down Expand Up @@ -507,7 +517,8 @@
"resetWebUIDesc2": "もしギャラリーに画像が表示されないなど、何か問題が発生した場合はGitHubにissueを提出する前にリセットを試してください。",
"resetComplete": "WebUIはリセットされました。",
"ui": "ユーザーインターフェイス",
"beta": "ベータ"
"beta": "ベータ",
"developer": "開発者"
},
"toast": {
"uploadFailed": "アップロード失敗",
Expand Down Expand Up @@ -556,7 +567,8 @@
"negativePrompt": "ネガティブプロンプト",
"generationMode": "生成モード",
"vae": "VAE",
"cfgRescaleMultiplier": "$t(parameters.cfgRescaleMultiplier)"
"cfgRescaleMultiplier": "$t(parameters.cfgRescaleMultiplier)",
"canvasV2Metadata": "キャンバス"
},
"queue": {
"queueEmpty": "キューが空です",
Expand Down Expand Up @@ -690,7 +702,8 @@
"notes": "ノート",
"workflow": "ワークフロー",
"workflowName": "名前",
"workflowNotes": "ノート"
"workflowNotes": "ノート",
"enum": "Enum"
},
"boards": {
"autoAddBoard": "自動追加するボード",
Expand Down Expand Up @@ -823,6 +836,15 @@
},
"lora": {
"heading": "LoRA"
},
"loraWeight": {
"heading": "重み"
},
"patchmatchDownScaleSize": {
"heading": "Downscale"
},
"controlNetWeight": {
"heading": "重み"
}
},
"accordions": {
Expand Down Expand Up @@ -865,7 +887,8 @@
"queue": "キュー",
"canvas": "キャンバス",
"workflows": "ワークフロー",
"models": "モデル"
"models": "モデル",
"gallery": "ギャラリー"
}
},
"controlLayers": {
Expand All @@ -880,7 +903,8 @@
"bboxGroup": "バウンディングボックスから作成",
"cropCanvasToBbox": "キャンバスをバウンディングボックスでクロップ",
"newGlobalReferenceImage": "新規全域参照画像",
"newRegionalReferenceImage": "新規領域参照画像"
"newRegionalReferenceImage": "新規領域参照画像",
"canvasGroup": "キャンバス"
},
"regionalGuidance": "領域ガイダンス",
"globalReferenceImage": "全域参照画像",
Expand All @@ -901,7 +925,8 @@
"brush": "ブラシ",
"rectangle": "矩形",
"move": "移動",
"eraser": "消しゴム"
"eraser": "消しゴム",
"bbox": "Bbox"
},
"saveCanvasToGallery": "キャンバスをギャラリーに保存",
"saveBboxToGallery": "バウンディングボックスをギャラリーへ保存",
Expand All @@ -919,7 +944,27 @@
"canvas": "キャンバス",
"fitBboxToLayers": "バウンディングボックスをレイヤーにフィット",
"removeBookmark": "ブックマークを外す",
"savedToGalleryOk": "ギャラリーに保存しました"
"savedToGalleryOk": "ギャラリーに保存しました",
"controlMode": {
"prompt": "プロンプト"
},
"prompt": "プロンプト",
"settings": {
"snapToGrid": {
"off": "オフ",
"on": "オン"
}
},
"filter": {
"filter": "フィルター",
"spandrel_filter": {
"model": "モデル"
},
"apply": "適用",
"reset": "リセット",
"cancel": "キャンセル"
},
"weight": "重み"
},
"stylePresets": {
"clearTemplateSelection": "選択したテンプレートをクリア",
Expand All @@ -934,7 +979,10 @@
"toggleViewMode": "表示モードを切り替え",
"negativePromptColumn": "'negative_prompt'",
"preview": "プレビュー",
"nameColumn": "'name'"
"nameColumn": "'name'",
"type": "タイプ",
"private": "プライベート",
"name": "名称"
},
"upscaling": {
"upscaleModel": "アップスケールモデル",
Expand All @@ -946,7 +994,8 @@
"denoisingStrength": "ノイズ除去強度",
"scheduler": "スケジューラー",
"loading": "ロード中...",
"steps": "ステップ"
"steps": "ステップ",
"refiner": "Refiner"
},
"modelCache": {
"clear": "モデルキャッシュを消去",
Expand All @@ -958,5 +1007,23 @@
"ascending": "昇順",
"name": "名前",
"descending": "降順"
},
"system": {
"logNamespaces": {
"system": "システム",
"gallery": "ギャラリー",
"workflows": "ワークフロー",
"models": "モデル",
"canvas": "キャンバス",
"metadata": "メタデータ",
"queue": "キュー"
},
"logLevel": {
"debug": "Debug",
"info": "Info",
"error": "Error",
"fatal": "Fatal",
"warn": "Warn"
}
}
}
6 changes: 1 addition & 5 deletions invokeai/frontend/web/public/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2311,11 +2311,7 @@
"watchUiUpdatesOverview": "Xem Tổng Quan Về Những Cập Nhật Cho Giao Diện Người Dùng",
"items": [
"Cải thiện các thiết lập mặc định của VRAM",
"Xoá bộ nhớ đệm của model theo yêu cầu",
"Mở rộng khả năng tương thích LoRA trên FLUX",
"Bộ lọc điều chỉnh ảnh trên Canvas",
"Huỷ tất cả trừ mục đang xếp hàng hiện tại",
"Sao chép và dán trên Canvas"
"Xoá bộ nhớ đệm của model theo yêu cầu"
]
},
"upsell": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { enqueueRequested } from 'app/store/actions';
import type { AppStartListening } from 'app/store/middleware/listenerMiddleware';
import { extractMessageFromAssertionError } from 'common/util/extractMessageFromAssertionError';
import { withResult, withResultAsync } from 'common/util/result';
import { parseify } from 'common/util/serialize';
import { $canvasManager } from 'features/controlLayers/store/ephemeral';
import { prepareLinearUIBatch } from 'features/nodes/util/graph/buildLinearBatchConfig';
import { buildFLUXGraph } from 'features/nodes/util/graph/generation/buildFLUXGraph';
Expand All @@ -13,7 +14,6 @@ import { toast } from 'features/toast/toast';
import { serializeError } from 'serialize-error';
import { enqueueMutationFixedCacheKeyOptions, queueApi } from 'services/api/endpoints/queue';
import { assert, AssertionError } from 'tsafe';
import type { JsonObject } from 'type-fest';

const log = logger('generation');

Expand Down Expand Up @@ -80,16 +80,15 @@ export const addEnqueueRequestedLinear = (startAppListening: AppStartListening)
const req = dispatch(
queueApi.endpoints.enqueueBatch.initiate(prepareBatchResult.value, enqueueMutationFixedCacheKeyOptions)
);
req.reset();

const enqueueResult = await withResultAsync(() => req.unwrap());

if (enqueueResult.isErr()) {
log.error({ error: serializeError(enqueueResult.error) }, 'Failed to enqueue batch');
return;
try {
await req.unwrap();
log.debug(parseify({ batchConfig: prepareBatchResult.value }), 'Enqueued batch');
} catch (error) {
log.error({ error: serializeError(error) }, 'Failed to enqueue batch');
} finally {
req.reset();
}

log.debug({ batchConfig: prepareBatchResult.value } as JsonObject, 'Enqueued batch');
},
});
};
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import { logger } from 'app/logging/logger';
import { enqueueRequested } from 'app/store/actions';
import type { AppStartListening } from 'app/store/middleware/listenerMiddleware';
import { parseify } from 'common/util/serialize';
import { $templates } from 'features/nodes/store/nodesSlice';
import { selectNodesSlice } from 'features/nodes/store/selectors';
import { isBatchNode, isInvocationNode } from 'features/nodes/types/invocation';
import { buildNodesGraph } from 'features/nodes/util/graph/buildNodesGraph';
import { resolveBatchValue } from 'features/nodes/util/node/resolveBatchValue';
import { buildWorkflowWithValidation } from 'features/nodes/util/workflow/buildWorkflow';
import { groupBy } from 'lodash-es';
import { serializeError } from 'serialize-error';
import { enqueueMutationFixedCacheKeyOptions, queueApi } from 'services/api/endpoints/queue';
import type { Batch, BatchConfig } from 'services/api/types';

const log = logger('generation');

export const addEnqueueRequestedNodes = (startAppListening: AppStartListening) => {
startAppListening({
predicate: (action): action is ReturnType<typeof enqueueRequested> =>
Expand Down Expand Up @@ -101,6 +106,9 @@ export const addEnqueueRequestedNodes = (startAppListening: AppStartListening) =
const req = dispatch(queueApi.endpoints.enqueueBatch.initiate(batchConfig, enqueueMutationFixedCacheKeyOptions));
try {
await req.unwrap();
log.debug(parseify({ batchConfig }), 'Enqueued batch');
} catch (error) {
log.error({ error: serializeError(error) }, 'Failed to enqueue batch');
} finally {
req.reset();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { logger } from 'app/logging/logger';
import { enqueueRequested } from 'app/store/actions';
import type { AppStartListening } from 'app/store/middleware/listenerMiddleware';
import { parseify } from 'common/util/serialize';
import { prepareLinearUIBatch } from 'features/nodes/util/graph/buildLinearBatchConfig';
import { buildMultidiffusionUpscaleGraph } from 'features/nodes/util/graph/buildMultidiffusionUpscaleGraph';
import { serializeError } from 'serialize-error';
import { enqueueMutationFixedCacheKeyOptions, queueApi } from 'services/api/endpoints/queue';

const log = logger('generation');

export const addEnqueueRequestedUpscale = (startAppListening: AppStartListening) => {
startAppListening({
predicate: (action): action is ReturnType<typeof enqueueRequested> =>
Expand All @@ -19,6 +24,9 @@ export const addEnqueueRequestedUpscale = (startAppListening: AppStartListening)
const req = dispatch(queueApi.endpoints.enqueueBatch.initiate(batchConfig, enqueueMutationFixedCacheKeyOptions));
try {
await req.unwrap();
log.debug(parseify({ batchConfig }), 'Enqueued batch');
} catch (error) {
log.error({ error: serializeError(error) }, 'Failed to enqueue batch');
} finally {
req.reset();
}
Expand Down
17 changes: 17 additions & 0 deletions invokeai/frontend/web/src/common/components/linkify.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { SystemStyleObject } from '@invoke-ai/ui-library';
import type { Opts as LinkifyOpts } from 'linkifyjs';

export const linkifySx: SystemStyleObject = {
a: {
fontWeight: 'semibold',
},
'a:hover': {
textDecoration: 'underline',
},
};

export const linkifyOptions: LinkifyOpts = {
target: '_blank',
rel: 'noopener noreferrer',
validate: (value) => /^https?:\/\//.test(value),
};
Loading

0 comments on commit 59cc95f

Please sign in to comment.