jbilcke-hf HF staff commited on
Commit
51dbf06
·
1 Parent(s): e0c4dc2

new parameter: upscalingFactor

Browse files
Files changed (3) hide show
  1. TODO.md +4 -0
  2. src/app/engine/render.ts +5 -0
  3. src/types.ts +11 -0
TODO.md ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ - Allow interacting with the scene as soon as we have segments,
2
+ even if we don't have the full upscaled image yet
3
+ - Make sure we convert PNG to JPG before sending it back
4
+ - Try a different segmentation algorithm (one where we don't need to pass a list of words)
src/app/engine/render.ts CHANGED
@@ -59,6 +59,11 @@ export async function newRender({
59
  width: isForVideo ? 576 : 1024,
60
  height: isForVideo ? 320 : 768,
61
 
 
 
 
 
 
62
  // note that we never disable the cache completely for VideoQuest
63
  // that's because in the feedbacks people prefer speed to avoid frustration
64
  cache: clearCache ? "renew" : "use",
 
59
  width: isForVideo ? 576 : 1024,
60
  height: isForVideo ? 320 : 768,
61
 
62
+ // on VideoQuest we use an aggressive setting: 4X upscaling
63
+ // this generates images that can be slow to load, but that's
64
+ // not too much of an issue since we use async loading
65
+ upscalingFactor: 4,
66
+
67
  // note that we never disable the cache completely for VideoQuest
68
  // that's because in the feedbacks people prefer speed to avoid frustration
69
  cache: clearCache ? "renew" : "use",
src/types.ts CHANGED
@@ -29,9 +29,20 @@ export interface RenderRequest {
29
  width: number // fixed at 1024 for now
30
  height: number // fixed at 512 for now
31
 
 
 
 
 
 
 
 
 
 
32
  projection: ProjectionMode
33
 
34
  cache: CacheMode
 
 
35
  }
36
 
37
  export interface ImageSegment {
 
29
  width: number // fixed at 1024 for now
30
  height: number // fixed at 512 for now
31
 
32
+ // upscaling factor
33
+ // 0: no upscaling
34
+ // 1: no upscaling
35
+ // 2: 2x larger
36
+ // 3: 3x larger
37
+ // 4x: 4x larger, up to 4096x4096 (warning: a PNG of this size can be 50 Mb!)
38
+ upscalingFactor: number
39
+
40
+
41
  projection: ProjectionMode
42
 
43
  cache: CacheMode
44
+
45
+ wait: boolean // wait until the job is completed
46
  }
47
 
48
  export interface ImageSegment {