mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-13 22:14:59 -05:00
Change feature to disable apiModels to chatGPT4oModels only (#7996)
* display credit column in queue list if shouldShowCredits is true * change apiModels feature to chatGPT4oModels feature * empty --------- Co-authored-by: Mary Hipp <maryhipp@Marys-MacBook-Air.local>
This commit is contained in:
@@ -89,7 +89,7 @@ const debouncedUpdateReasons = debounce(
|
||||
config: AppConfig,
|
||||
store: AppStore,
|
||||
isInPublishFlow: boolean,
|
||||
areApiModelsEnabled: boolean
|
||||
areChatGPT4oModelsEnabled: boolean
|
||||
) => {
|
||||
if (tab === 'canvas') {
|
||||
const model = selectMainModelConfig(store.getState());
|
||||
@@ -104,7 +104,7 @@ const debouncedUpdateReasons = debounce(
|
||||
canvasIsRasterizing,
|
||||
canvasIsCompositing,
|
||||
canvasIsSelectingObject,
|
||||
areApiModelsEnabled,
|
||||
areChatGPT4oModelsEnabled,
|
||||
});
|
||||
$reasonsWhyCannotEnqueue.set(reasons);
|
||||
} else if (tab === 'workflows') {
|
||||
@@ -152,7 +152,7 @@ export const useReadinessWatcher = () => {
|
||||
const canvasIsSelectingObject = useStore(canvasManager?.stateApi.$isSegmenting ?? $true);
|
||||
const canvasIsCompositing = useStore(canvasManager?.compositor.$isBusy ?? $true);
|
||||
const isInPublishFlow = useStore($isInPublishFlow);
|
||||
const areApiModelsEnabled = useFeatureStatus('apiModels');
|
||||
const areChatGPT4oModelsEnabled = useFeatureStatus('chatGPT4oModels');
|
||||
|
||||
useEffect(() => {
|
||||
debouncedUpdateReasons(
|
||||
@@ -173,7 +173,7 @@ export const useReadinessWatcher = () => {
|
||||
config,
|
||||
store,
|
||||
isInPublishFlow,
|
||||
areApiModelsEnabled
|
||||
areChatGPT4oModelsEnabled
|
||||
);
|
||||
}, [
|
||||
store,
|
||||
@@ -193,7 +193,7 @@ export const useReadinessWatcher = () => {
|
||||
upscale,
|
||||
workflowSettings,
|
||||
isInPublishFlow,
|
||||
areApiModelsEnabled,
|
||||
areChatGPT4oModelsEnabled,
|
||||
]);
|
||||
};
|
||||
|
||||
@@ -341,7 +341,7 @@ const getReasonsWhyCannotEnqueueCanvasTab = (arg: {
|
||||
canvasIsRasterizing: boolean;
|
||||
canvasIsCompositing: boolean;
|
||||
canvasIsSelectingObject: boolean;
|
||||
areApiModelsEnabled: boolean;
|
||||
areChatGPT4oModelsEnabled: boolean;
|
||||
}) => {
|
||||
const {
|
||||
isConnected,
|
||||
@@ -354,7 +354,7 @@ const getReasonsWhyCannotEnqueueCanvasTab = (arg: {
|
||||
canvasIsRasterizing,
|
||||
canvasIsCompositing,
|
||||
canvasIsSelectingObject,
|
||||
areApiModelsEnabled,
|
||||
areChatGPT4oModelsEnabled,
|
||||
} = arg;
|
||||
const { positivePrompt } = params;
|
||||
const reasons: Reason[] = [];
|
||||
@@ -487,7 +487,7 @@ const getReasonsWhyCannotEnqueueCanvasTab = (arg: {
|
||||
}
|
||||
}
|
||||
|
||||
if ((model?.base === 'imagen3' || model?.base === 'chatgpt-4o') && !areApiModelsEnabled) {
|
||||
if (model?.base === 'chatgpt-4o' && !areChatGPT4oModelsEnabled) {
|
||||
reasons.push({ content: i18n.t('parameters.invoke.modelDisabledForTrial', { modelName: model.name }) });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user