{ loading = true; if (imageGenerationEngine === 'openai') { await updateOpenAIConfig(localStorage.token, OPENAI_API_BASE_URL, OPENAI_API_KEY); } await updateDefaultImageGenerationModel(localStorage.token, selectedModel); await updateImageSize(localStorage.token, imageSize).catch((error) => { toast.error(error); return null; }); await updateImageSteps(localStorage.token, steps).catch((error) => { toast.error(error); return null; }); dispatch('save'); loading = false; }} >
{$i18n.t('Image Settings')}
{$i18n.t('Image Generation Engine')}
{$i18n.t('Image Generation (Experimental)')}

{#if imageGenerationEngine === ''}
{$i18n.t('AUTOMATIC1111 Base URL')}
{$i18n.t('Include `--api` flag when running stable-diffusion-webui')} {$i18n.t('(e.g. `sh webui.sh --api`)')}
{$i18n.t('AUTOMATIC1111 Api Auth String')}
{$i18n.t('Include `--api-auth` flag when running stable-diffusion-webui')} {$i18n.t('(e.g. `sh webui.sh --api --api-auth username_password`)').replace('_', ':')}
{:else if imageGenerationEngine === 'comfyui'}
{$i18n.t('ComfyUI Base URL')}
{:else if imageGenerationEngine === 'openai'}
{$i18n.t('OpenAI API Config')}
{/if} {#if enableImageGeneration}
{$i18n.t('Set Default Model')}
{#if imageGenerationEngine === 'openai' && !OPENAI_API_BASE_URL.includes('https://api.openai.com')}
{#each models ?? [] as model} {/each}
{:else} {/if}
{$i18n.t('Set Image Size')}
{$i18n.t('Set Steps')}
{/if}