Skip to content

Commit

Permalink
Update MAXIM models to use patch sizes (#1278)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekevinscott authored Dec 1, 2023
1 parent d456542 commit 996ceae
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions models/maxim-deblurring/demo/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Upscaler from "upscaler";
import model from '@upscalerjs/maxim-deblurring';
import fixture from "./fixture.png";

const upscaler = new Upscaler({
model,
});

upscaler.upscale(fixture).then((upscaledImgSrc) => {
const fixture = document.getElementById('fixture');
upscaler.upscale(fixture, { patchSize: 64, padding: 2, progress: console.log }).then((upscaledImgSrc) => {
const img = document.createElement("img");
img.src = upscaledImgSrc;
document.getElementById("target").appendChild(img);
Expand Down
2 changes: 1 addition & 1 deletion models/maxim-dehazing-indoor/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const upscaler = new Upscaler({
model,
});

upscaler.upscale(fixture).then((upscaledImgSrc) => {
upscaler.upscale(fixture, { patchSize: 64, padding: 2, progress: console.log }).then((upscaledImgSrc) => {
const img = document.createElement("img");
img.src = upscaledImgSrc;
document.getElementById("target").appendChild(img);
Expand Down
2 changes: 1 addition & 1 deletion models/maxim-dehazing-outdoor/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const upscaler = new Upscaler({
model,
});

upscaler.upscale(fixture).then((upscaledImgSrc) => {
upscaler.upscale(fixture, { patchSize: 64, padding: 2, progress: console.log }).then((upscaledImgSrc) => {
const img = document.createElement("img");
img.src = upscaledImgSrc;
document.getElementById("target").appendChild(img);
Expand Down
2 changes: 1 addition & 1 deletion models/maxim-denoising/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const upscaler = new Upscaler({
model,
});

upscaler.upscale(fixture).then((upscaledImgSrc) => {
upscaler.upscale(fixture, { patchSize: 64, padding: 2, progress: console.log }).then((upscaledImgSrc) => {
const img = document.createElement("img");
img.src = upscaledImgSrc;
document.getElementById("target").appendChild(img);
Expand Down
2 changes: 1 addition & 1 deletion models/maxim-deraining/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const upscaler = new Upscaler({
model,
});

upscaler.upscale(fixture).then((upscaledImgSrc) => {
upscaler.upscale(fixture, { patchSize: 64, padding: 2, progress: console.log }).then((upscaledImgSrc) => {
const img = document.createElement("img");
img.src = upscaledImgSrc;
document.getElementById("target").appendChild(img);
Expand Down
2 changes: 1 addition & 1 deletion models/maxim-enhancement/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const upscaler = new Upscaler({
model,
});

upscaler.upscale(fixture).then((upscaledImgSrc) => {
upscaler.upscale(fixture, { patchSize: 64, padding: 2, progress: console.log }).then((upscaledImgSrc) => {
const img = document.createElement("img");
img.src = upscaledImgSrc;
document.getElementById("target").appendChild(img);
Expand Down
2 changes: 1 addition & 1 deletion models/maxim-retouching/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const upscaler = new Upscaler({
model,
});

upscaler.upscale(fixture).then((upscaledImgSrc) => {
upscaler.upscale(fixture, { patchSize: 64, padding: 2, progress: console.log }).then((upscaledImgSrc) => {
const img = document.createElement("img");
img.src = upscaledImgSrc;
document.getElementById("target").appendChild(img);
Expand Down

0 comments on commit 996ceae

Please sign in to comment.