mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Add loopback to just img2img. Remove from settings.
This commit is contained in:
parent
9a6a970771
commit
25b19b9ab8
@ -1,13 +1,19 @@
|
|||||||
import InvokeButton from './InvokeButton';
|
import InvokeButton from './InvokeButton';
|
||||||
import CancelButton from './CancelButton';
|
import CancelButton from './CancelButton';
|
||||||
|
import LoopbackButton from './Loopback';
|
||||||
|
import { useAppSelector } from 'app/store';
|
||||||
|
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Buttons to start and cancel image generation.
|
* Buttons to start and cancel image generation.
|
||||||
*/
|
*/
|
||||||
const ProcessButtons = () => {
|
const ProcessButtons = () => {
|
||||||
|
const activeTabName = useAppSelector(activeTabNameSelector);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="process-buttons">
|
<div className="process-buttons">
|
||||||
<InvokeButton />
|
<InvokeButton />
|
||||||
|
{activeTabName === 'img2img' && <LoopbackButton />}
|
||||||
<CancelButton />
|
<CancelButton />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -32,11 +32,10 @@ import IAISelect from 'common/components/IAISelect';
|
|||||||
import IAINumberInput from 'common/components/IAINumberInput';
|
import IAINumberInput from 'common/components/IAINumberInput';
|
||||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
import { systemSelector } from 'features/system/store/systemSelectors';
|
||||||
import { optionsSelector } from 'features/options/store/optionsSelectors';
|
import { optionsSelector } from 'features/options/store/optionsSelectors';
|
||||||
import { setShouldLoopback } from 'features/options/store/optionsSlice';
|
|
||||||
|
|
||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
[systemSelector, optionsSelector],
|
[systemSelector, optionsSelector],
|
||||||
(system, options) => {
|
(system) => {
|
||||||
const {
|
const {
|
||||||
shouldDisplayInProgressType,
|
shouldDisplayInProgressType,
|
||||||
shouldConfirmOnDelete,
|
shouldConfirmOnDelete,
|
||||||
@ -46,8 +45,6 @@ const selector = createSelector(
|
|||||||
enableImageDebugging,
|
enableImageDebugging,
|
||||||
} = system;
|
} = system;
|
||||||
|
|
||||||
const { shouldLoopback } = options;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
shouldDisplayInProgressType,
|
shouldDisplayInProgressType,
|
||||||
shouldConfirmOnDelete,
|
shouldConfirmOnDelete,
|
||||||
@ -55,7 +52,6 @@ const selector = createSelector(
|
|||||||
models: _.map(model_list, (_model, key) => key),
|
models: _.map(model_list, (_model, key) => key),
|
||||||
saveIntermediatesInterval,
|
saveIntermediatesInterval,
|
||||||
enableImageDebugging,
|
enableImageDebugging,
|
||||||
shouldLoopback,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -97,7 +93,6 @@ const SettingsModal = ({ children }: SettingsModalProps) => {
|
|||||||
shouldDisplayGuides,
|
shouldDisplayGuides,
|
||||||
saveIntermediatesInterval,
|
saveIntermediatesInterval,
|
||||||
enableImageDebugging,
|
enableImageDebugging,
|
||||||
shouldLoopback,
|
|
||||||
} = useAppSelector(selector);
|
} = useAppSelector(selector);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -178,14 +173,6 @@ const SettingsModal = ({ children }: SettingsModalProps) => {
|
|||||||
dispatch(setShouldDisplayGuides(e.target.checked))
|
dispatch(setShouldDisplayGuides(e.target.checked))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<IAISwitch
|
|
||||||
styleClass="settings-modal-item"
|
|
||||||
label={'Image to Image Loopback'}
|
|
||||||
isChecked={shouldLoopback}
|
|
||||||
onChange={(e: ChangeEvent<HTMLInputElement>) =>
|
|
||||||
dispatch(setShouldLoopback(e.target.checked))
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-modal-items">
|
<div className="settings-modal-items">
|
||||||
|
Loading…
Reference in New Issue
Block a user