pcuenq HF staff commited on
Commit
3fbe084
1 Parent(s): f160eaf

Downscale to prevent OOM (#2)

Browse files

- Downscale to prevent OOM (5f876fa2d394b0d21567a0cf7bf37cadba1b238b)

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ processor = FuyuProcessor(image_processor=FuyuImageProcessor(), tokenizer=tokeni
15
 
16
  caption_prompt = "Generate a coco-style caption.\\n"
17
 
18
- def resize_to_max(image, max_width=1920, max_height=1080):
19
  width, height = image.size
20
  if width <= max_width and height <= max_height:
21
  return image
 
15
 
16
  caption_prompt = "Generate a coco-style caption.\\n"
17
 
18
+ def resize_to_max(image, max_width=1080, max_height=1080):
19
  width, height = image.size
20
  if width <= max_width and height <= max_height:
21
  return image