- {#each requiredWorkflowNodes as node}
-
-
-
- {node.type}{node.type === 'prompt' ? '*' : ''}
-
-
-
-
-
-
-
-
-
-
-
-
-
+ {:else if config?.IMAGE_GENERATION_ENGINE === 'comfyui'}
+
+
+
+
+ {$i18n.t('ComfyUI Base URL')}
- {/each}
-
+
-
- {$i18n.t('*Prompt node ID(s) are required for image generation')}
-
-
- {/if}
- {:else if config?.IMAGE_GENERATION_ENGINE === 'openai'}
-
-
{$i18n.t('OpenAI API Config')}
-
-
-
-
-
{$i18n.t('API Key')}
-
-
-
-
-
{$i18n.t('API Version')}
-
-
- {:else if config?.IMAGE_GENERATION_ENGINE === 'gemini'}
-
-
{$i18n.t('Gemini API Config')}
-
-
-
-
-
-
-
- {/if}
-
-
- {#if config?.ENABLE_IMAGE_GENERATION}
-
-
-
-
{$i18n.t('Set Default Model')}
-
-
-
-
-
+
+
+
+
-
-
-
-
{$i18n.t('Set Image Size')}
-
-
+
+
+
+
+ {$i18n.t('ComfyUI API Key')}
+
+
- {#if ['comfyui', 'automatic1111', ''].includes(config?.IMAGE_GENERATION_ENGINE)}
-
-
{$i18n.t('Set Steps')}
-
-
- {/if}
- {/if}
+
+
+
{
+ const file = e.target.files[0];
+ const reader = new FileReader();
+
+ reader.onload = (e) => {
+ config.COMFYUI_WORKFLOW = e.target.result;
+ e.target.value = null;
+ };
+
+ reader.readAsText(file);
+ }}
+ />
+
+
+
+ {$i18n.t('ComfyUI Workflow')}
+
+
+
+
+
+ {#if config.COMFYUI_WORKFLOW}
+
+ {/if}
+
+
+
+
+
+
+
+
+
+ {
+ config.COMFYUI_WORKFLOW = e;
+ }}
+ onSave={() => {
+ console.log('Saved');
+ }}
+ />
+
+ {$i18n.t('Make sure to export a workflow.json file as API format from ComfyUI.')}
+
+
+
+ {#if config.COMFYUI_WORKFLOW}
+
+
+
+
+ {$i18n.t('ComfyUI Workflow Nodes')}
+
+
+
+
+
+ {#each requiredWorkflowNodes as node}
+
+
+
+ {node.type}{node.type === 'prompt' ? '*' : ''}
+
+
+
+
+
+
+
+
+
+
+
:
+
+
+
+
+
+
+
+
+ {/each}
+
+
+
+ {$i18n.t('*Prompt node ID(s) are required for image generation')}
+
+
+ {/if}
+ {:else if config?.IMAGE_GENERATION_ENGINE === 'gemini'}
+
+
+
+
+ {$i18n.t('Gemini Base URL')}
+
+
+
+
+
+
+
+
+
+
+
+ {$i18n.t('Gemini API Key')}
+
+
+
+
+
+
+ {/if}
+
+
{/if}
diff --git a/src/lib/components/admin/Settings/Interface.svelte b/src/lib/components/admin/Settings/Interface.svelte
index 3114bea688..37e80a75d2 100644
--- a/src/lib/components/admin/Settings/Interface.svelte
+++ b/src/lib/components/admin/Settings/Interface.svelte
@@ -111,7 +111,7 @@
>