jbilcke-hf HF Staff commited on
Commit
185eaaf
·
1 Parent(s): 92ae21d

fixed upscaling

Browse files
Files changed (1) hide show
  1. src/index.mts +2 -2
src/index.mts CHANGED
@@ -256,11 +256,11 @@ app.post("/upscale", async (req, res) => {
256
  let assetUrl = ""
257
  try {
258
  try {
259
- assetUrl = await upscaleImage(image, 2)
260
  } catch (err) {
261
  // hmm.. let's try again?
262
  try {
263
- assetUrl = await upscaleImage(image, 2)
264
  } catch (err) {
265
  throw new Error(`second attempt to upscale the image failed (${err})`)
266
  }
 
256
  let assetUrl = ""
257
  try {
258
  try {
259
+ assetUrl = await upscaleImage(image, req.body.factor)
260
  } catch (err) {
261
  // hmm.. let's try again?
262
  try {
263
+ assetUrl = await upscaleImage(image, req.body.factor)
264
  } catch (err) {
265
  throw new Error(`second attempt to upscale the image failed (${err})`)
266
  }