enzostvs HF staff commited on
Commit
ccfda8f
·
1 Parent(s): 51b205a

fix check format

Browse files
Files changed (1) hide show
  1. routes/generate/index.js +2 -2
routes/generate/index.js CHANGED
@@ -27,7 +27,7 @@ const IMAGE_SIZES = {
27
  height: 384,
28
  width: 512
29
  },
30
- "landscape-16-9": {
31
  height: 288,
32
  width: 512
33
  }
@@ -50,7 +50,7 @@ module.exports = async function (fastify, opts) {
50
  .send(file);
51
  }
52
 
53
- const { height, width } = IMAGE_SIZES[format ?? "square"];
54
 
55
  const hfRequest = await inference.textToImage({
56
  inputs,
 
27
  height: 384,
28
  width: 512
29
  },
30
+ "landscape-16_9": {
31
  height: 288,
32
  width: 512
33
  }
 
50
  .send(file);
51
  }
52
 
53
+ const { height, width } = IMAGE_SIZES[format ?? "square"] ?? IMAGE_SIZES["square"];
54
 
55
  const hfRequest = await inference.textToImage({
56
  inputs,