Skip to content

Commit

Permalink
fix: 自定义宽高
Browse files Browse the repository at this point in the history
  • Loading branch information
misaka20002 committed Oct 9, 2024
1 parent ca77f70 commit a690f1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ function scaleParam(text) {
text = text.replace(new RegExp(size, 'g'), '');
}
});

let [width, height] = [1024, 1024]
const result = /(\d{2,7})[\*×](\d{2,7})/.exec(text);
if (result) {
let [width, height] = [Math.floor(Number(result[1]) / 64) * 64, Math.floor(Number(result[2]) / 64) * 64];
[width, height] = [Math.floor(Number(result[1]) / 64) * 64, Math.floor(Number(result[2]) / 64) * 64];

const FLUXDEV_c = new FLUXDEV();
const config_this = FLUXDEV_c.get_config_this()
Expand Down

0 comments on commit a690f1a

Please sign in to comment.