Skip to content

Commit

Permalink
chore: resize to 512 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo1912 authored Mar 6, 2024
1 parent 86e693e commit 89f22a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function UpscalerBattleground() {

let inferenceTime;

const resizedImage = await resizeImage(file, 1024);
const resizedImage = await resizeImage(file, 512);
const result: Record<string, any> = await fal.subscribe(firstModel.model, {
input: {
image_url: resizedImage,
Expand Down Expand Up @@ -85,7 +85,7 @@ export default function UpscalerBattleground() {

let inferenceTime;

const resizedImage = await resizeImage(file, 1024);
const resizedImage = await resizeImage(file, 512);
const result: Record<string, any> = await fal.subscribe(secondModel.model, {
input: {
image_url: resizedImage,
Expand Down
2 changes: 1 addition & 1 deletion lib/image.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export async function resizeImage(file: File, max: number = 1024): Promise<Blob> {
export async function resizeImage(file: File, max: number = 512): Promise<Blob> {
const canvas = document.createElement("canvas");
const ctx = canvas.getContext("2d");

Expand Down

0 comments on commit 89f22a8

Please sign in to comment.