Overmasking Questions #27
Replies: 2 comments 1 reply
-
lmao that makes at least two of us :D the implementation was and continues to be "i don't know how to make it but i think i know what i want so i'm going to just keep trying things until one gets close" so the initial intent was based off of these two reddit posts and associated discord post: essentially, it "seemed" like manually masking over a seam before outpainting really did do nice things for camouflaging the seams and i figured "well shucks, that should be able to be done in the background automagically" and received a hefty lesson in hubris :) my first attempt was indeed to simply expand the white region x pixels in all cardinal directions, which really just... visibly moved the seam x pixels in the appropriate cardinal direction. i tried changing that to a small gradient based on 255/overmaskpx, which just made a MORE visible mask with an obvious gradient. tried changing the gradient falloff to a more linear one, don't quite remember the exact math, it was literally just throwing stuff at the wall and seeing what sticks lol, but it didn't work either. didn't try doing anything as wide as @SMUsamaShah's been playing with, but it might be a fun additional function, gradient mask? iunno. anyway, i tried "randomly" stippling individual pixels with probability determined in another stupid for loop of overmaskpx (never committed for blatantly obvious reasons,, but for the morbidly curious:) yeah that was by FAR the worst result yet, i got nothing but windowpaned unrelated images with noisy borders in practically EVERY outpaint. i tried most recently to simply find the equivalent paths of the white regions and draw a simple "paint mask" style line over it, but i was too stupid to get that to work right, but discovered that if i just threw an x px circle over each pixel of the overpaint seams, it effectively does exactly that, and the "humanization" just came in as a further attempt to kinda hide the seams. it could be all placebo but i SWEAR it actually kinda works pretty well now :) i will readily admit to just using inefficient loops where something like maybe a map reduce would probably be infinitely superior but i also don't exactly know how to map reduce and pretty much just google for a remedial solution to whatever problem i'm facing at the moment and push the one that works which is probably untenable in the long run lol |
Beta Was this translation helpful? Give feedback.
-
figured moving this to a discussion was more githubby :) |
Beta Was this translation helpful? Give feedback.
-
I actually have some questions about overmasking, and what exactly it does...
I'm currently working on optimizing and simplifying the img2img code, and I'm kinda confused on its implementation. From what I see on the main branch, originally it inserted arcs randomly? And from the new overmasking branch, it seems to expand the mask to all four cardinal directions by n pixels, dictated by the Overmask px parameter?
What I'm trying to do is remove most of the ImageData Stuff because I don't like all those for loops (48f45e5); The only thing that is missing is overmasking, but I'm not sure what it is supposed to do.
Beta Was this translation helpful? Give feedback.
All reactions