chore: image edit invert painting area
This commit is contained in:
@@ -132,6 +132,7 @@ const ParamsSettings: React.FC<ParamsSettingsProps> = forwardRef(
|
||||
onValuesChange={handleValuesChange}
|
||||
onFinish={handleOnFinish}
|
||||
onFinishFailed={handleOnFinishFailed}
|
||||
initialValues={initialValues}
|
||||
>
|
||||
<div>
|
||||
{
|
||||
|
||||
@@ -157,11 +157,6 @@ const GroundImages: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
}, [finalParameters, currentPrompt, parameters.size]);
|
||||
|
||||
const handleClear = () => {
|
||||
// setImageList([]);
|
||||
// setTokenResult(null);
|
||||
// setMask('');
|
||||
// setImage('');
|
||||
// setUploadList([]);
|
||||
setCurrentPrompt('');
|
||||
};
|
||||
|
||||
@@ -393,11 +388,33 @@ const GroundImages: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
editable={false}
|
||||
autoBgColor={false}
|
||||
onClick={() => handleOnImgClick(uploadList[0], true)}
|
||||
label={<span>Origin</span>}
|
||||
></SingleImage>
|
||||
</>
|
||||
);
|
||||
}, [uploadList, handleOnImgClick]);
|
||||
|
||||
const renderMaskImage = useMemo(() => {
|
||||
if (!maskUpload.length) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<SingleImage
|
||||
{...maskUpload[0]}
|
||||
height={125}
|
||||
maxHeight={125}
|
||||
preview={false}
|
||||
loading={false}
|
||||
autoSize={false}
|
||||
editable={false}
|
||||
autoBgColor={false}
|
||||
label={<span>Mask</span>}
|
||||
></SingleImage>
|
||||
</>
|
||||
);
|
||||
}, [maskUpload]);
|
||||
|
||||
return (
|
||||
<div className="ground-left-wrapper">
|
||||
<div className="ground-left">
|
||||
@@ -428,6 +445,7 @@ const GroundImages: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
alignItems: 'center'
|
||||
}}
|
||||
>
|
||||
<div className="m-r-10">{renderMaskImage}</div>
|
||||
{renderOriginImage}
|
||||
{imageList.length > 0 && (
|
||||
<>
|
||||
|
||||
@@ -553,7 +553,7 @@ export const ChatParamsConfig: ParamsSchema[] = [
|
||||
},
|
||||
attrs: {
|
||||
max: 2,
|
||||
step: 0.1,
|
||||
step: 0.01,
|
||||
inputnumber: true
|
||||
},
|
||||
rules: [
|
||||
@@ -599,7 +599,55 @@ export const ChatParamsConfig: ParamsSchema[] = [
|
||||
},
|
||||
attrs: {
|
||||
max: 1,
|
||||
step: 0.1,
|
||||
step: 0.01,
|
||||
inputnumber: true
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
required: false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'Slider',
|
||||
name: 'frequency_penalty',
|
||||
label: {
|
||||
text: 'Frequency Penalty',
|
||||
isLocalized: false
|
||||
},
|
||||
description: {
|
||||
text: 'playground.params.frequency_penalty.tips',
|
||||
html: false,
|
||||
isLocalized: true
|
||||
},
|
||||
attrs: {
|
||||
max: 2,
|
||||
min: -2,
|
||||
step: 0.01,
|
||||
inputnumber: true
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
required: false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'Slider',
|
||||
name: 'presence_penalty',
|
||||
label: {
|
||||
text: 'Presence Penalty',
|
||||
isLocalized: false
|
||||
},
|
||||
description: {
|
||||
text: 'playground.params.presence_penalty.tips',
|
||||
html: false,
|
||||
isLocalized: true
|
||||
},
|
||||
attrs: {
|
||||
max: 2,
|
||||
min: -2,
|
||||
step: 0.01,
|
||||
inputnumber: true
|
||||
},
|
||||
rules: [
|
||||
|
||||
@@ -5,7 +5,9 @@ export const LLM_METAKEYS: Record<string, any> = {
|
||||
top_p: 'top_p',
|
||||
n_ctx: 'n_ctx',
|
||||
n_slot: 'n_slot',
|
||||
max_model_len: 'max_model_len'
|
||||
max_model_len: 'max_model_len',
|
||||
frequency_penalty: 'frequency_penalty',
|
||||
presence_penalty: 'presence_penalty'
|
||||
};
|
||||
|
||||
export const IMG_METAKEYS = [
|
||||
@@ -23,7 +25,9 @@ export const llmInitialValues = {
|
||||
stop: null,
|
||||
temperature: 1,
|
||||
top_p: 1,
|
||||
max_tokens: null
|
||||
max_tokens: null,
|
||||
frequency_penalty: null,
|
||||
presence_penalty: null
|
||||
};
|
||||
|
||||
export const advancedFieldsDefaultValus = {
|
||||
|
||||
Reference in New Issue
Block a user