Skip to content

Commit

Permalink
exclude flux models from main model dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Mary Hipp authored and brandonrising committed Aug 21, 2024
1 parent 0367725 commit 13b7a47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions invokeai/frontend/web/src/services/api/hooks/modelsByType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
isFluxMainModelModelConfig,
isIPAdapterModelConfig,
isLoRAModelConfig,
isNonRefinerMainModelConfig,
isNonRefinerNonFluxMainModelConfig,
isNonSDXLMainModelConfig,
isRefinerMainModelModelConfig,
isSDXLMainModelModelConfig,
Expand All @@ -35,7 +35,7 @@ const buildModelsHook =
return [modelConfigs, result] as const;
};

export const useMainModels = buildModelsHook(isNonRefinerMainModelConfig);
export const useMainModels = buildModelsHook(isNonRefinerNonFluxMainModelConfig);
export const useNonSDXLMainModels = buildModelsHook(isNonSDXLMainModelConfig);
export const useRefinerModels = buildModelsHook(isRefinerMainModelModelConfig);
export const useFluxModels = buildModelsHook(isFluxMainModelModelConfig);
Expand Down
4 changes: 4 additions & 0 deletions invokeai/frontend/web/src/services/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export const isNonRefinerMainModelConfig = (config: AnyModelConfig): config is M
return config.type === 'main' && config.base !== 'sdxl-refiner';
};

export const isNonRefinerNonFluxMainModelConfig = (config: AnyModelConfig): config is MainModelConfig => {
return config.type === 'main' && config.base !== 'sdxl-refiner' && config.base !== 'flux';
};

export const isRefinerMainModelModelConfig = (config: AnyModelConfig): config is MainModelConfig => {
return config.type === 'main' && config.base === 'sdxl-refiner';
};
Expand Down

0 comments on commit 13b7a47

Please sign in to comment.