mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'main' into fix/img2img-low-strength
This commit is contained in:
commit
7aa331af8c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
frontend/dist/index.html
vendored
4
frontend/dist/index.html
vendored
@ -7,7 +7,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>InvokeAI - A Stable Diffusion Toolkit</title>
|
||||
<link rel="shortcut icon" type="icon" href="./assets/favicon.0d253ced.ico" />
|
||||
<script type="module" crossorigin src="./assets/index.be0f03f1.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index.5c5bc3f1.js"></script>
|
||||
<link rel="stylesheet" href="./assets/index.8badc8b4.css">
|
||||
<script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
|
||||
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
|
||||
@ -18,6 +18,6 @@
|
||||
|
||||
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
|
||||
<script nomodule crossorigin id="vite-legacy-polyfill" src="./assets/polyfills-legacy-dde3a68a.js"></script>
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="./assets/index-legacy-279e042c.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="./assets/index-legacy-35973932.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
</body>
|
||||
</html>
|
||||
|
1
frontend/dist/locales/options/de.json
vendored
1
frontend/dist/locales/options/de.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Nahtunschärfe",
|
||||
"seamStrength": "Stärke der Naht",
|
||||
"seamSteps": "Nahtstufen",
|
||||
"inpaintReplace": "Inpaint Ersetzen",
|
||||
"scaleBeforeProcessing": "Skalieren vor der Verarbeitung",
|
||||
"scaledWidth": "Skaliert W",
|
||||
"scaledHeight": "Skaliert H",
|
||||
|
1
frontend/dist/locales/options/en-US.json
vendored
1
frontend/dist/locales/options/en-US.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Seam Blur",
|
||||
"seamStrength": "Seam Strength",
|
||||
"seamSteps": "Seam Steps",
|
||||
"inpaintReplace": "Inpaint Replace",
|
||||
"scaleBeforeProcessing": "Scale Before Processing",
|
||||
"scaledWidth": "Scaled W",
|
||||
"scaledHeight": "Scaled H",
|
||||
|
1
frontend/dist/locales/options/en.json
vendored
1
frontend/dist/locales/options/en.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Seam Blur",
|
||||
"seamStrength": "Seam Strength",
|
||||
"seamSteps": "Seam Steps",
|
||||
"inpaintReplace": "Inpaint Replace",
|
||||
"scaleBeforeProcessing": "Scale Before Processing",
|
||||
"scaledWidth": "Scaled W",
|
||||
"scaledHeight": "Scaled H",
|
||||
|
1
frontend/dist/locales/options/es.json
vendored
1
frontend/dist/locales/options/es.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Desenfoque del parche",
|
||||
"seamStrength": "Fuerza del parche",
|
||||
"seamSteps": "Pasos del parche",
|
||||
"inpaintReplace": "Reemplazar impresión interior",
|
||||
"scaleBeforeProcessing": "Redimensionar antes de procesar",
|
||||
"scaledWidth": "Ancho escalado",
|
||||
"scaledHeight": "Alto escalado",
|
||||
|
1
frontend/dist/locales/options/it.json
vendored
1
frontend/dist/locales/options/it.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Sfocatura cucitura",
|
||||
"seamStrength": "Forza della cucitura",
|
||||
"seamSteps": "Passaggi di cucitura",
|
||||
"inpaintReplace": "Inpaint Sostituisci",
|
||||
"scaleBeforeProcessing": "Scala prima dell'elaborazione",
|
||||
"scaledWidth": "Larghezza ridimensionata",
|
||||
"scaledHeight": "Altezza ridimensionata",
|
||||
|
1
frontend/dist/locales/options/ja.json
vendored
1
frontend/dist/locales/options/ja.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Seam Blur",
|
||||
"seamStrength": "Seam Strength",
|
||||
"seamSteps": "Seam Steps",
|
||||
"inpaintReplace": "Inpaint Replace",
|
||||
"scaleBeforeProcessing": "処理前のスケール",
|
||||
"scaledWidth": "幅のスケール",
|
||||
"scaledHeight": "高さのスケール",
|
||||
|
1
frontend/dist/locales/options/nl.json
vendored
1
frontend/dist/locales/options/nl.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Vervaging naad",
|
||||
"seamStrength": "Sterkte naad",
|
||||
"seamSteps": "Stappen naad",
|
||||
"inpaintReplace": "Inpaintvervanging",
|
||||
"scaleBeforeProcessing": "Schalen voor verwerking",
|
||||
"scaledWidth": "Geschaalde B",
|
||||
"scaledHeight": "Geschaalde H",
|
||||
|
1
frontend/dist/locales/options/pl.json
vendored
1
frontend/dist/locales/options/pl.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Rozmycie",
|
||||
"seamStrength": "Siła",
|
||||
"seamSteps": "Kroki",
|
||||
"inpaintReplace": "Tryb podmiany",
|
||||
"scaleBeforeProcessing": "Tryb skalowania",
|
||||
"scaledWidth": "Sk. do szer.",
|
||||
"scaledHeight": "Sk. do wys.",
|
||||
|
1
frontend/dist/locales/options/pt_br.json
vendored
1
frontend/dist/locales/options/pt_br.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Desfoque da Fronteira",
|
||||
"seamStrength": "Força da Fronteira",
|
||||
"seamSteps": "Passos da Fronteira",
|
||||
"inpaintReplace": "Substituir com Inpaint",
|
||||
"scaleBeforeProcessing": "Escala Antes do Processamento",
|
||||
"scaledWidth": "L Escalada",
|
||||
"scaledHeight": "A Escalada",
|
||||
|
1
frontend/dist/locales/options/ru.json
vendored
1
frontend/dist/locales/options/ru.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Размытие шва",
|
||||
"seamStrength": "Сила шва",
|
||||
"seamSteps": "Шаги шва",
|
||||
"inpaintReplace": "Inpaint-замена",
|
||||
"scaleBeforeProcessing": "Масштабировать",
|
||||
"scaledWidth": "Масштаб Ш",
|
||||
"scaledHeight": "Масштаб В",
|
||||
|
1
frontend/dist/locales/options/zh_cn.json
vendored
1
frontend/dist/locales/options/zh_cn.json
vendored
@ -30,7 +30,6 @@
|
||||
"seamBlur": "接缝模糊",
|
||||
"seamStrength": "接缝强度",
|
||||
"seamSteps": "接缝步数",
|
||||
"inpaintReplace": "内画替换",
|
||||
"scaleBeforeProcessing": "处理前缩放",
|
||||
"scaledWidth": "缩放宽度",
|
||||
"scaledHeight": "缩放长度",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Nahtunschärfe",
|
||||
"seamStrength": "Stärke der Naht",
|
||||
"seamSteps": "Nahtstufen",
|
||||
"inpaintReplace": "Inpaint Ersetzen",
|
||||
"scaleBeforeProcessing": "Skalieren vor der Verarbeitung",
|
||||
"scaledWidth": "Skaliert W",
|
||||
"scaledHeight": "Skaliert H",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Seam Blur",
|
||||
"seamStrength": "Seam Strength",
|
||||
"seamSteps": "Seam Steps",
|
||||
"inpaintReplace": "Inpaint Replace",
|
||||
"scaleBeforeProcessing": "Scale Before Processing",
|
||||
"scaledWidth": "Scaled W",
|
||||
"scaledHeight": "Scaled H",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Seam Blur",
|
||||
"seamStrength": "Seam Strength",
|
||||
"seamSteps": "Seam Steps",
|
||||
"inpaintReplace": "Inpaint Replace",
|
||||
"scaleBeforeProcessing": "Scale Before Processing",
|
||||
"scaledWidth": "Scaled W",
|
||||
"scaledHeight": "Scaled H",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Desenfoque del parche",
|
||||
"seamStrength": "Fuerza del parche",
|
||||
"seamSteps": "Pasos del parche",
|
||||
"inpaintReplace": "Reemplazar impresión interior",
|
||||
"scaleBeforeProcessing": "Redimensionar antes de procesar",
|
||||
"scaledWidth": "Ancho escalado",
|
||||
"scaledHeight": "Alto escalado",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Sfocatura cucitura",
|
||||
"seamStrength": "Forza della cucitura",
|
||||
"seamSteps": "Passaggi di cucitura",
|
||||
"inpaintReplace": "Inpaint Sostituisci",
|
||||
"scaleBeforeProcessing": "Scala prima dell'elaborazione",
|
||||
"scaledWidth": "Larghezza ridimensionata",
|
||||
"scaledHeight": "Altezza ridimensionata",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Seam Blur",
|
||||
"seamStrength": "Seam Strength",
|
||||
"seamSteps": "Seam Steps",
|
||||
"inpaintReplace": "Inpaint Replace",
|
||||
"scaleBeforeProcessing": "処理前のスケール",
|
||||
"scaledWidth": "幅のスケール",
|
||||
"scaledHeight": "高さのスケール",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Vervaging naad",
|
||||
"seamStrength": "Sterkte naad",
|
||||
"seamSteps": "Stappen naad",
|
||||
"inpaintReplace": "Inpaintvervanging",
|
||||
"scaleBeforeProcessing": "Schalen voor verwerking",
|
||||
"scaledWidth": "Geschaalde B",
|
||||
"scaledHeight": "Geschaalde H",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Rozmycie",
|
||||
"seamStrength": "Siła",
|
||||
"seamSteps": "Kroki",
|
||||
"inpaintReplace": "Tryb podmiany",
|
||||
"scaleBeforeProcessing": "Tryb skalowania",
|
||||
"scaledWidth": "Sk. do szer.",
|
||||
"scaledHeight": "Sk. do wys.",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Desfoque da Fronteira",
|
||||
"seamStrength": "Força da Fronteira",
|
||||
"seamSteps": "Passos da Fronteira",
|
||||
"inpaintReplace": "Substituir com Inpaint",
|
||||
"scaleBeforeProcessing": "Escala Antes do Processamento",
|
||||
"scaledWidth": "L Escalada",
|
||||
"scaledHeight": "A Escalada",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "Размытие шва",
|
||||
"seamStrength": "Сила шва",
|
||||
"seamSteps": "Шаги шва",
|
||||
"inpaintReplace": "Inpaint-замена",
|
||||
"scaleBeforeProcessing": "Масштабировать",
|
||||
"scaledWidth": "Масштаб Ш",
|
||||
"scaledHeight": "Масштаб В",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"seamBlur": "接缝模糊",
|
||||
"seamStrength": "接缝强度",
|
||||
"seamSteps": "接缝步数",
|
||||
"inpaintReplace": "内画替换",
|
||||
"scaleBeforeProcessing": "处理前缩放",
|
||||
"scaledWidth": "缩放宽度",
|
||||
"scaledHeight": "缩放长度",
|
||||
|
@ -196,8 +196,6 @@ export const frontendToBackendParameters = (
|
||||
layerState: { objects },
|
||||
boundingBoxCoordinates,
|
||||
boundingBoxDimensions,
|
||||
inpaintReplace,
|
||||
shouldUseInpaintReplace,
|
||||
stageScale,
|
||||
isMaskEnabled,
|
||||
shouldPreserveMaskedArea,
|
||||
@ -223,10 +221,6 @@ export const frontendToBackendParameters = (
|
||||
|
||||
generationParameters.invert_mask = shouldPreserveMaskedArea;
|
||||
|
||||
if (shouldUseInpaintReplace) {
|
||||
generationParameters.inpaint_replace = inpaintReplace;
|
||||
}
|
||||
|
||||
generationParameters.bounding_box = boundingBox;
|
||||
|
||||
const tempScale = canvasBaseLayer.scale();
|
||||
|
@ -49,7 +49,6 @@ const initialCanvasState: CanvasState = {
|
||||
cursorPosition: null,
|
||||
doesCanvasNeedScaling: false,
|
||||
futureLayerStates: [],
|
||||
inpaintReplace: 0.1,
|
||||
isCanvasInitialized: false,
|
||||
isDrawing: false,
|
||||
isMaskEnabled: true,
|
||||
@ -82,7 +81,6 @@ const initialCanvasState: CanvasState = {
|
||||
shouldShowStagingImage: true,
|
||||
shouldShowStagingOutline: true,
|
||||
shouldSnapToGrid: true,
|
||||
shouldUseInpaintReplace: false,
|
||||
stageCoordinates: { x: 0, y: 0 },
|
||||
stageDimensions: { width: 0, height: 0 },
|
||||
stageScale: 1,
|
||||
@ -264,12 +262,6 @@ export const canvasSlice = createSlice({
|
||||
state.pastLayerStates = [];
|
||||
state.futureLayerStates = [];
|
||||
},
|
||||
setShouldUseInpaintReplace: (state, action: PayloadAction<boolean>) => {
|
||||
state.shouldUseInpaintReplace = action.payload;
|
||||
},
|
||||
setInpaintReplace: (state, action: PayloadAction<number>) => {
|
||||
state.inpaintReplace = action.payload;
|
||||
},
|
||||
setShouldLockBoundingBox: (state, action: PayloadAction<boolean>) => {
|
||||
state.shouldLockBoundingBox = action.payload;
|
||||
},
|
||||
@ -858,7 +850,6 @@ export const {
|
||||
setCursorPosition,
|
||||
setDoesCanvasNeedScaling,
|
||||
setInitialCanvasImage,
|
||||
setInpaintReplace,
|
||||
setIsDrawing,
|
||||
setIsMaskEnabled,
|
||||
setIsMouseOverBoundingBox,
|
||||
@ -885,7 +876,6 @@ export const {
|
||||
setShouldShowStagingImage,
|
||||
setShouldShowStagingOutline,
|
||||
setShouldSnapToGrid,
|
||||
setShouldUseInpaintReplace,
|
||||
setStageCoordinates,
|
||||
setStageScale,
|
||||
setTool,
|
||||
|
@ -125,7 +125,6 @@ export interface CanvasState {
|
||||
cursorPosition: Vector2d | null;
|
||||
doesCanvasNeedScaling: boolean;
|
||||
futureLayerStates: CanvasLayerState[];
|
||||
inpaintReplace: number;
|
||||
intermediateImage?: InvokeAI.Image;
|
||||
isCanvasInitialized: boolean;
|
||||
isDrawing: boolean;
|
||||
@ -159,7 +158,6 @@ export interface CanvasState {
|
||||
shouldShowStagingImage: boolean;
|
||||
shouldShowStagingOutline: boolean;
|
||||
shouldSnapToGrid: boolean;
|
||||
shouldUseInpaintReplace: boolean;
|
||||
stageCoordinates: Vector2d;
|
||||
stageDimensions: Dimensions;
|
||||
stageScale: number;
|
||||
|
@ -21,7 +21,6 @@ import { systemSelector } from 'features/system/store/systemSelectors';
|
||||
import _ from 'lodash';
|
||||
import { ChangeEvent } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import InpaintReplace from './InpaintReplace';
|
||||
|
||||
const selector = createSelector(
|
||||
[optionsSelector, systemSelector, canvasSelector],
|
||||
@ -148,7 +147,6 @@ const InfillAndScalingOptions = () => {
|
||||
withReset
|
||||
handleReset={handleResetScaledHeight}
|
||||
/>
|
||||
<InpaintReplace />
|
||||
<IAISelect
|
||||
label={t('options:infillMethod')}
|
||||
value={infillMethod}
|
||||
|
@ -1,67 +0,0 @@
|
||||
import React, { ChangeEvent } from 'react';
|
||||
import { useAppDispatch, useAppSelector } from '../../../../../app/storeHooks';
|
||||
import _ from 'lodash';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import IAISwitch from '../../../../../common/components/IAISwitch';
|
||||
import IAISlider from '../../../../../common/components/IAISlider';
|
||||
import { Flex } from '@chakra-ui/react';
|
||||
import {
|
||||
setInpaintReplace,
|
||||
setShouldUseInpaintReplace,
|
||||
} from 'features/canvas/store/canvasSlice';
|
||||
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const selector = createSelector(
|
||||
canvasSelector,
|
||||
(canvas) => {
|
||||
const { inpaintReplace, shouldUseInpaintReplace } = canvas;
|
||||
return {
|
||||
inpaintReplace,
|
||||
shouldUseInpaintReplace,
|
||||
};
|
||||
},
|
||||
{
|
||||
memoizeOptions: {
|
||||
resultEqualityCheck: _.isEqual,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
export default function InpaintReplace() {
|
||||
const { inpaintReplace, shouldUseInpaintReplace } = useAppSelector(selector);
|
||||
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Flex alignItems={'center'} columnGap={'0.2rem'}>
|
||||
<IAISlider
|
||||
label={t('options:inpaintReplace')}
|
||||
value={inpaintReplace}
|
||||
onChange={(v: number) => {
|
||||
dispatch(setInpaintReplace(v));
|
||||
}}
|
||||
min={0}
|
||||
max={1.0}
|
||||
step={0.05}
|
||||
isInteger={false}
|
||||
isSliderDisabled={!shouldUseInpaintReplace}
|
||||
withSliderMarks
|
||||
sliderMarkRightOffset={-2}
|
||||
withReset
|
||||
handleReset={() => dispatch(setInpaintReplace(0.1))}
|
||||
withInput
|
||||
isResetDisabled={!shouldUseInpaintReplace}
|
||||
/>
|
||||
<IAISwitch
|
||||
isChecked={shouldUseInpaintReplace}
|
||||
onChange={(e: ChangeEvent<HTMLInputElement>) =>
|
||||
dispatch(setShouldUseInpaintReplace(e.target.checked))
|
||||
}
|
||||
marginTop="1.25rem"
|
||||
/>
|
||||
</Flex>
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user