umer-wasim commited on
Commit
13f075f
·
verified ·
1 Parent(s): 964bd64
Files changed (3) hide show
  1. app/package.json +1 -1
  2. app/renderer/app.js +33 -12
  3. worker/ora_worker.py +1 -1
app/package.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "name": "devseis-ora",
3
  "productName": "Ora",
4
- "version": "0.1.6",
5
  "description": "Make videos from a prompt on your own computer with Wan2.1 1.3B and Wan2.2 5B.",
6
  "author": {
7
  "name": "Devseis",
 
1
  {
2
  "name": "devseis-ora",
3
  "productName": "Ora",
4
+ "version": "0.1.7",
5
  "description": "Make videos from a prompt on your own computer with Wan2.1 1.3B and Wan2.2 5B.",
6
  "author": {
7
  "name": "Devseis",
app/renderer/app.js CHANGED
@@ -558,19 +558,40 @@ function renderModelChoices() {
558
  if (m.h3 && catalogOk('h3')) vids.push(['h3', 'Long', 'Up to 15 s with sound (MiniMax H3) · Beta']);
559
  seg($('modelSeg'), vids, 'model', renderLengths);
560
  if (!vids.some(v => v[0] === form.model)) form.model = 'fast';
561
- if (runWhere() === 'cloudflare') {
562
- seg($('imgModelSeg'), [['cf-flux1s', 'FLUX.1-schnell · Cloudflare', 'Instant · 1024×1024 · ~58 free Neurons each']], 'model', null, imgForm);
563
- imgForm.model = 'cf-flux1s'; imgForm.shape = 'square';
564
- $('imgModelSeg').hidden = false;
565
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  }
567
- if (imgForm.model === 'cf-flux1s') imgForm.model = 'zimage';
568
- const imgs = [['zimage', 'Z-Image-Turbo 6B', 'Default · photo-real, any computer']];
569
- if (catalogOk('flux1s')) imgs.push(['flux1s', 'FLUX.1-schnell 12B', 'Very sharp, 4 steps']);
570
- if (catalogOk('qwenimg')) imgs.push(['qwenimg', 'Qwen-Image 20B', 'Best for text in images']);
571
- seg($('imgModelSeg'), imgs, 'model', null, imgForm);
572
- if (!imgs.some(v => v[0] === imgForm.model)) imgForm.model = 'zimage';
573
- $('imgModelSeg').closest('.field').querySelector('.seg').hidden = imgs.length < 2;
574
  }
575
 
576
  // --- online GPU (Kaggle, Colab) ----------------------------------------------------------------------------------
 
558
  if (m.h3 && catalogOk('h3')) vids.push(['h3', 'Long', 'Up to 15 s with sound (MiniMax H3) · Beta']);
559
  seg($('modelSeg'), vids, 'model', renderLengths);
560
  if (!vids.some(v => v[0] === form.model)) form.model = 'fast';
561
+ // Image models with plain names. All are listed; ones this computer cannot run are greyed out with the reason.
562
+ // "Instant" is Cloudflare: picking it switches Run on to Cloudflare, picking another model switches back.
563
+ const cfOn = !!(online.cloudflare && online.cloudflare.connected);
564
+ const where = runWhere();
565
+ const lockedWhy = id => {
566
+ const c = catalog.find(e => e.id === id);
567
+ if (where !== 'local') return c && c.online && c.online[where] ? '' : `not available on ${serviceName(where)}`;
568
+ if (c && c.installed && c.check.ok) return '';
569
+ if (c && !c.check.ok) return 'needs a graphics card here · works Online (Kaggle, Colab)';
570
+ return 'download it in Models · or use Online';
571
+ };
572
+ const list = [
573
+ ['zimage', 'Standard', 'Photo-real pictures · any computer', ''],
574
+ ['flux1s', 'Sharp', 'Very crisp detail in 4 steps', lockedWhy('flux1s')],
575
+ ['qwenimg', 'Text & posters', 'Best at words inside the picture', lockedWhy('qwenimg')],
576
+ ['cf-flux1s', 'Instant', cfOn ? 'Seconds, on Cloudflare · 1024×1024' : 'Connect Cloudflare in Online (free, ~170 a day)', cfOn ? '' : 'connect Cloudflare first'],
577
+ ];
578
+ if (where === 'cloudflare') imgForm.model = 'cf-flux1s';
579
+ else if (imgForm.model === 'cf-flux1s') imgForm.model = 'zimage';
580
+ if (where !== 'cloudflare' && list.some(([id, , , why]) => id === imgForm.model && why)) imgForm.model = 'zimage';
581
+ seg($('imgModelSeg'), list.map(([id, label, sub, why]) => [id, label, why ? `${sub} — ${why}` : sub]), 'model', () => {
582
+ // switching to/from Instant moves Run on to/from Cloudflare
583
+ if (imgForm.model === 'cf-flux1s') { store('ora.runOnline', true); store('ora.onlineService', 'cloudflare'); }
584
+ else if (runWhere() === 'cloudflare') {
585
+ const other = ['colab', 'kaggle'].find(w => online[w] && online[w].connected);
586
+ if (other) store('ora.onlineService', other); else store('ora.runOnline', false);
587
+ }
588
+ renderRunOn(); renderModelChoices(); renderDevice(); sync();
589
+ }, imgForm);
590
+ for (const b of $('imgModelSeg').children) {
591
+ const item = list.find(x => x[0] === b.dataset.value);
592
+ b.disabled = !!(item && item[3]);
593
  }
594
+ $('imgModelSeg').hidden = false;
 
 
 
 
 
 
595
  }
596
 
597
  // --- online GPU (Kaggle, Colab) ----------------------------------------------------------------------------------
worker/ora_worker.py CHANGED
@@ -12,7 +12,7 @@ only requests carrying that code's secret are accepted. Standard library only.
12
  import argparse, base64, hashlib, json, os, re, secrets, shutil, subprocess, sys, tarfile, threading, time, urllib.request
13
  from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
14
 
15
- VERSION = '0.1.6'
16
  SITE = 'https://devseis-ora.static.hf.space'
17
  RELEASES = 'https://huggingface.co/datasets/Devseis/ora-releases/resolve/main'
18
  ENGINE_FILE = 'ora-engine-linux-cuda.tar.gz'
 
12
  import argparse, base64, hashlib, json, os, re, secrets, shutil, subprocess, sys, tarfile, threading, time, urllib.request
13
  from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
14
 
15
+ VERSION = '0.1.7'
16
  SITE = 'https://devseis-ora.static.hf.space'
17
  RELEASES = 'https://huggingface.co/datasets/Devseis/ora-releases/resolve/main'
18
  ENGINE_FILE = 'ora-engine-linux-cuda.tar.gz'