{#if open}
{#if loadingModels}
Loading models...
{:else if loadError}
{loadError}
{:else if models.length === 0}
No models found — add a checkpoint to ComfyUI/models/checkpoints and restart ComfyUI.
{:else if archGroups.length === 0}
No matches
{:else} {#each archGroups as g (g.label)}
{g.label}
{#each g.models as m (m.hash)} {/each} {/each} {/if}
{#if selectedModelHash}
{#if loadingTemplates}
Loading templates...
{:else if templates.length === 0}
No templates for this model
{:else} {#each templates as tpl (tpl.id)} {/each} {/if}
{/if}
{/if}