Repository navigation
Conversation
6674bd5 to
1dbdede
Compare
cubicj
left a comment
There was a problem hiding this comment.
I went through 1dbdede on this. applyImageOrientation only reorders the two configured edges, so the pixel count a script can request stays exactly what the settings allow, and the Variety+ sigma comes out identical since it is computed from the product. Only the NovelAI branch reads options, and the other five generateAIImage callers still pass four arguments, so their request bodies are unchanged from main. I also checked the Lua side with wasmoon directly, and a {orientation='portrait'} table arrives as a plain object while an omitted or nil fourth argument takes the default path as described.
Just one thing to flag, not blocking. A non-table fourth argument such as a bare 'portrait' string has no orientation field, so it skips the check and generates at the configured orientation without the error string coming back. pnpm check, pnpm test, and pnpm build are clean on this head.
Approving — thanks for the contribution!
PR Checklist
Summary
Lua
generateImage()may set its ownorientation.To prevent troll scripts draining NAI credits, the script can't modify dimension but only its orientation.
Related Issues
None
Changes
Lua
generateImage()now expects up to 4 parameters.NAI branch of
stableDiff.tscalls a new function,applyImageOrientation().Impact
None, backward compatible.
Footnotes
Modifies the behavior of prompting, requesting, or handling responses from AI models. ↩
Over 80% of the code is AI generated. ↩