polats commited on
Commit
8e1c8c5
·
1 Parent(s): f77d660

Default portraits to Klein ZeroGPU

Browse files
Files changed (1) hide show
  1. web/imagen.js +2 -2
web/imagen.js CHANGED
@@ -5,14 +5,14 @@ import { engineLocal as zimagelocal, engineKleinZeroGpu as klein, engineCloud as
5
  import { engine as bonsai } from '/web/imagenBonsai.js'
6
 
7
  const ENGINES = [zimagelocal, klein, bonsai, flux, fluxdev]
8
- // Default: local Z-Image on localhost (your GPU), cloud FLUX in prod. Persisted across
9
  // refreshes; a saved choice wins if it's still available.
10
  const KEY = 'tinyarmy.imageEngine'
11
  let activeId = (() => {
12
  let saved = ''
13
  try { saved = localStorage.getItem(KEY) || '' } catch { /* ignore */ }
14
  const e = ENGINES.find((x) => x.id === saved)
15
- return e && e.available() ? saved : (isLocalhost() ? 'zimage-local' : 'flux')
16
  })()
17
 
18
  const eng = () => ENGINES.find((e) => e.id === activeId) || ENGINES.find((e) => e.available()) || ENGINES[0]
 
5
  import { engine as bonsai } from '/web/imagenBonsai.js'
6
 
7
  const ENGINES = [zimagelocal, klein, bonsai, flux, fluxdev]
8
+ // Default: local Z-Image on localhost (your GPU), Klein ZeroGPU in prod. Persisted across
9
  // refreshes; a saved choice wins if it's still available.
10
  const KEY = 'tinyarmy.imageEngine'
11
  let activeId = (() => {
12
  let saved = ''
13
  try { saved = localStorage.getItem(KEY) || '' } catch { /* ignore */ }
14
  const e = ENGINES.find((x) => x.id === saved)
15
+ return e && e.available() ? saved : (isLocalhost() ? 'zimage-local' : 'klein-zerogpu')
16
  })()
17
 
18
  const eng = () => ENGINES.find((e) => e.id === activeId) || ENGINES.find((e) => e.available()) || ENGINES[0]