mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
chore(ui): add TODO for revising field type names
This commit is contained in:
@@ -36,6 +36,26 @@ export const MODEL_TYPES: FieldType[] = [
|
||||
'IPAdapterModelField',
|
||||
];
|
||||
|
||||
/**
|
||||
* TODO: Revise the field type naming scheme
|
||||
*
|
||||
* Unfortunately, due to inconsistent naming of types, we need to keep the below map objects/callbacks.
|
||||
*
|
||||
* Problems:
|
||||
* - some types do not use the word "Field" in their name, e.g. "Scheduler"
|
||||
* - primitive types use all-lowercase names, e.g. "integer"
|
||||
* - collection and polymorphic types do not use the word "Field"
|
||||
*
|
||||
* If these inconsistencies were resolved, we could remove these mappings and use simple string
|
||||
* parsing/manipulation to handle field types.
|
||||
*
|
||||
* It would make some of the parsing logic simpler and reduce the maintenance overhead of adding new
|
||||
* "official" field types.
|
||||
*
|
||||
* This will require migration logic for workflows to update their field types. Workflows *do* have a
|
||||
* version attached to them, so this shouldn't be too difficult.
|
||||
*/
|
||||
|
||||
export const COLLECTION_MAP: FieldTypeMapWithNumber = {
|
||||
integer: 'IntegerCollection',
|
||||
boolean: 'BooleanCollection',
|
||||
|
||||
Reference in New Issue
Block a user