feat: model file is lora
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { ModelFileFormData as FormData } from '@/pages/resources/config/types';
|
||||
import {
|
||||
CheckboxField,
|
||||
Input as CInput,
|
||||
Cascader as SealCascader,
|
||||
Select as SealSelect,
|
||||
@@ -240,6 +241,20 @@ const TargetForm: React.FC<TargetFormProps> = forwardRef((props, ref) => {
|
||||
></CInput.Input>
|
||||
</Form.Item>
|
||||
)}
|
||||
{source === modelSourceMap.local_path_value && (
|
||||
<Form.Item<FormData>
|
||||
name="is_lora"
|
||||
key="is_lora"
|
||||
valuePropName="checked"
|
||||
noStyle
|
||||
>
|
||||
<CheckboxField
|
||||
label={intl.formatMessage({
|
||||
id: 'resources.modelfiles.form.isLora'
|
||||
})}
|
||||
></CheckboxField>
|
||||
</Form.Item>
|
||||
)}
|
||||
</Form>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -98,7 +98,7 @@ const getResolvedPath = (pathList: string[]) => {
|
||||
const setActionList = (record: ListItem) => {
|
||||
return _.filter(modelFileActions, (item: { key: string }) => {
|
||||
if (item.key === 'deploy') {
|
||||
return record.state === ModelfileStateMap.Ready;
|
||||
return record.state === ModelfileStateMap.Ready && !record.is_lora;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
@@ -244,6 +244,11 @@ const ResolvedPathColumn = (props: { record: ListItem }) => {
|
||||
</span>
|
||||
</AutoTooltip>
|
||||
</TextWrapper>
|
||||
{record.is_lora && (
|
||||
<FilesTag color="purple" variant="outlined">
|
||||
<span style={{ opacity: 1 }}>LoRA</span>
|
||||
</FilesTag>
|
||||
)}
|
||||
<RenderParts record={record}></RenderParts>
|
||||
</PathWrapper>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user