mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): make prompt not required
- also change the placeholder text
This commit is contained in:
parent
7d74cbe29c
commit
844058c0a5
@ -506,8 +506,8 @@
|
|||||||
"isScheduled": "Canceling",
|
"isScheduled": "Canceling",
|
||||||
"setType": "Set cancel type"
|
"setType": "Set cancel type"
|
||||||
},
|
},
|
||||||
"promptPlaceholder": "Type prompt here. [negative tokens], (upweight)++, (downweight)--, swap and blend are available (see docs)",
|
"positivePromptPlaceholder": "Positive Prompt",
|
||||||
"negativePrompts": "Negative Prompts",
|
"negativePromptPlaceholder": "Negative Prompt",
|
||||||
"sendTo": "Send to",
|
"sendTo": "Send to",
|
||||||
"sendToImg2Img": "Send to Image to Image",
|
"sendToImg2Img": "Send to Image to Image",
|
||||||
"sendToUnifiedCanvas": "Send To Unified Canvas",
|
"sendToUnifiedCanvas": "Send To Unified Canvas",
|
||||||
|
@ -9,25 +9,14 @@ import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
|||||||
const readinessSelector = createSelector(
|
const readinessSelector = createSelector(
|
||||||
[generationSelector, systemSelector, activeTabNameSelector],
|
[generationSelector, systemSelector, activeTabNameSelector],
|
||||||
(generation, system, activeTabName) => {
|
(generation, system, activeTabName) => {
|
||||||
const {
|
const { shouldGenerateVariations, seedWeights, initialImage, seed } =
|
||||||
positivePrompt: prompt,
|
generation;
|
||||||
shouldGenerateVariations,
|
|
||||||
seedWeights,
|
|
||||||
initialImage,
|
|
||||||
seed,
|
|
||||||
} = generation;
|
|
||||||
|
|
||||||
const { isProcessing, isConnected } = system;
|
const { isProcessing, isConnected } = system;
|
||||||
|
|
||||||
let isReady = true;
|
let isReady = true;
|
||||||
const reasonsWhyNotReady: string[] = [];
|
const reasonsWhyNotReady: string[] = [];
|
||||||
|
|
||||||
// Cannot generate without a prompt
|
|
||||||
if (!prompt || Boolean(prompt.match(/^[\s\r\n]+$/))) {
|
|
||||||
isReady = false;
|
|
||||||
reasonsWhyNotReady.push('Missing prompt');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (activeTabName === 'img2img' && !initialImage) {
|
if (activeTabName === 'img2img' && !initialImage) {
|
||||||
isReady = false;
|
isReady = false;
|
||||||
reasonsWhyNotReady.push('No initial image selected');
|
reasonsWhyNotReady.push('No initial image selected');
|
||||||
|
@ -20,10 +20,7 @@ const ParamNegativeConditioning = () => {
|
|||||||
name="negativePrompt"
|
name="negativePrompt"
|
||||||
value={negativePrompt}
|
value={negativePrompt}
|
||||||
onChange={(e) => dispatch(setNegativePrompt(e.target.value))}
|
onChange={(e) => dispatch(setNegativePrompt(e.target.value))}
|
||||||
placeholder={t('parameters.negativePrompts')}
|
placeholder={t('parameters.negativePromptPlaceholder')}
|
||||||
_focusVisible={{
|
|
||||||
borderColor: 'error.600',
|
|
||||||
}}
|
|
||||||
fontSize="sm"
|
fontSize="sm"
|
||||||
minH={16}
|
minH={16}
|
||||||
/>
|
/>
|
||||||
|
@ -70,13 +70,11 @@ const ParamPositiveConditioning = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<FormControl
|
<FormControl>
|
||||||
isInvalid={prompt.length === 0 || Boolean(prompt.match(/^[\s\r\n]+$/))}
|
|
||||||
>
|
|
||||||
<IAITextarea
|
<IAITextarea
|
||||||
id="prompt"
|
id="prompt"
|
||||||
name="prompt"
|
name="prompt"
|
||||||
placeholder={t('parameters.promptPlaceholder')}
|
placeholder={t('parameters.positivePromptPlaceholder')}
|
||||||
value={prompt}
|
value={prompt}
|
||||||
onChange={handleChangePrompt}
|
onChange={handleChangePrompt}
|
||||||
onKeyDown={handleKeyDown}
|
onKeyDown={handleKeyDown}
|
||||||
|
@ -35,6 +35,6 @@ export const getInputOutlineStyles = (_props?: StyleFunctionProps) => ({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
_placeholder: {
|
_placeholder: {
|
||||||
color: 'base.400',
|
color: 'base.500',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user