jbilcke-hf HF staff commited on
Commit
95bbb7f
β€’
1 Parent(s): b34c8c0

faster. better. stronger.

Browse files
src/utils/filesystem/saveRenderedSceneToCache.mts CHANGED
@@ -36,7 +36,7 @@ export async function saveRenderedSceneToCache(
36
  */
37
 
38
  await fs.writeFile(cacheFilePath, renderedSceneJson, "utf8")
39
- console.log(`saved result to cache`)
40
 
41
  return scene
42
  }
 
36
  */
37
 
38
  await fs.writeFile(cacheFilePath, renderedSceneJson, "utf8")
39
+ // console.log(`saved result to cache`)
40
 
41
  return scene
42
  }
src/utils/requests/hashRequest.mts CHANGED
@@ -7,11 +7,12 @@ export function hashRequest(request: RenderRequest) {
7
  const hashable = {
8
  version: 1,
9
  prompt: request.prompt,
 
10
  segmentation: request.segmentation,
11
  actionnables: request.actionnables,
12
  nbFrames: request.nbFrames,
13
  nbSteps: request.nbSteps,
14
- // seed: request.seed,
15
  width: request.width,
16
  height: request.height,
17
  projection: request.projection,
 
7
  const hashable = {
8
  version: 1,
9
  prompt: request.prompt,
10
+ negativePrompt: request.negativePrompt,
11
  segmentation: request.segmentation,
12
  actionnables: request.actionnables,
13
  nbFrames: request.nbFrames,
14
  nbSteps: request.nbSteps,
15
+ seed: request.seed,
16
  width: request.width,
17
  height: request.height,
18
  projection: request.projection,
src/utils/requests/parseRenderRequest.mts CHANGED
@@ -9,13 +9,12 @@ export function parseRenderRequest(request: RenderRequest) {
9
  try {
10
  request.nbFrames = getValidNumber(request.nbFrames, 1, 24, 16)
11
 
12
- // wait! if we uncomment this, this will invalidate all the images already in cache..
13
- // request.negativePrompt = request.negativePrompt || ""
14
 
15
  const isVideo = request?.nbFrames === 1
16
 
17
  // note that we accept a seed of 0
18
- // (this ensure we are able to cache the whote request by signing it)
19
  request.seed = getValidNumber(request.seed, 0, 2147483647, 0)
20
 
21
  // but obviously we will treat 0 as the random seed at a later stage
 
9
  try {
10
  request.nbFrames = getValidNumber(request.nbFrames, 1, 24, 16)
11
 
12
+ request.negativePrompt = request.negativePrompt || ""
 
13
 
14
  const isVideo = request?.nbFrames === 1
15
 
16
  // note that we accept a seed of 0
17
+ // (this ensure we are able to cache the whole request by signing it)
18
  request.seed = getValidNumber(request.seed, 0, 2147483647, 0)
19
 
20
  // but obviously we will treat 0 as the random seed at a later stage