-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic Layers and Not-Quite Infinity #60
Conversation
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Oh, controls: ctrl + wheel is canvas zoom; middle mouse + drag is canvas move; rest should be as always. |
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
At least temporarily, still want to check what causes smaller canvases to break pixel perfection Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
oh sure, just a tiny little adjustment here and there whenever you've got a few seconds ;) spent like 10 minutes trying to figure out why /sdapi/v1/txt2img was 404ing until i noticed i was surprisingly getting CORS errors, and even more surprisingly they stopped when i cleared out my localstorage which i don't even know what to think about that i also experienced the reticle "decentering" from the cursor at a few zoom levels but i suspect 6b0a25c fixes that nicely love the "more" button after generation completes :D haven't had a chance to go through all of this particularly deeply yet but i suspect i'll learn some new concepts as your commits generally have that effect :) what i've seen so far looks wonderful as always though, thanks! -edit minor visual bug, if you refresh the page with devtools open and then close them, checkerboard pans down the screen to "compensate" |
That is... Weird. Probably something about the loading of the host from the storage? If there was something strange it should have asked you to re-enter the host though.
That should not have fixed anything, really. It's just a fix for the debug part of the ui. About decentering, maybe it is with a odd number of scale? I noticed it is snapping to both tile center and corners.
We should do more of these small quality of life updates, actually
No worries, any questions please tell.
Could you file this as an issue? I can give it a look later. |
right?? it handled the OPTIONS and GET calls to
:badpokerface: welp i just saw the addition of the offset and decided "yes, that must've been it, jolly good" :D
genuinely agreed! actually on that, i wanted to apologize for not pushing more stuff recently; you keep just cranking out these PRs that are fantastic if a bit over my head sometimes and i'm simple and need time to catch up, and admittedly, like 97% of the functionality i wanted at first is functionally here already and i just can't stop playing with it lol i may have also wasted some time trying to learn how to talk to SD2 over the weekend
done and done; it's really quite minor in the fact that a user could quite easily just... pan the canvas back to origin :D #61 |
Now that I think about it, it may have been my fault, as I basically reimplemented the full pipeline of dream() in general. If I remember correctly, when I saw the fetch() call used for dream, I removed most of the headers that I considered redundant. Probably there was a cache-related header that triggered some issues, and cleaning site data may have resolved the cache issue.
If you could create an issue for this one too, it would be perfect!
No problems whatsoever! I am quite satisfied with the current state of the app, actually.
That is something I have to give a deeper look; Interestingly, even though I created the discussion on SD2, I have still not used it myself.
Yeah, that's what I was thinking. I'm not really sure how to address this issue, as we don't really receive any information as to how the window was resized. Only that it was, indeed, resized, and the new window size. |
Add some shortcuts to dream image selection and fix strange cursor behavior on resource add from dream. (l/r arrow keys for navigation, enter for image select; esc for reject) Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Fixed canvas on chrome. It seems chrome doesn't like to transform layer coords based on CSS transforms, so we will have to do this manually. Windows now are kept inside the viewable area. No more losing them when resizing the window or dragging them outside. Fix for image gen shortcuts, now "+" generates more images. |
Viewport also starts in the center now, maybe could be a fix to #61. |
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
you are legitimately a machine
if i could reproduce it, i'd be glad to but it hasn't happened since lol; it was very similar to how it behaved long before i even pushed this to github if i was using it with devtools open and i was scrolled down the page, it was definitely offsetting incorrectly due to actual mouseX/Y vs canvasX/Y (ergo the coord monitors) back then... hasn't occurred since though, but if it does i'll try to recreate it reliably :) locking the floating windows to the active viewport is a little pinch of genius
sigh i need to start testing things on more than firefox because i didn't even know that was a thing lol
hah, i was 100% prepared to completely write off the checkerboard positioning as not-a-bug, wontfix, this is literally just how browsers work but here you are with more fixes already! i just noticed that if you answer N to an img2img batch, it leaves the previous marching ants behind - issue #63 opened :) as always, thanks for all you do and sorry i haven't been contributing more; lousy job that pays my bills demands my attention ;) |
i also think i failed to mention that i love love love the new progress indicator; i was seriously thinking "gee this could be a nice little feature that i might be able to write" about something extremely similar and then it just kinda showed up :D this is all marvelous and your suggestion of actual layers is maybe more intriguing than my original designs for infinite canvas lol i haven't experienced much in those offsets you mentioned in the initial PR message but that's probably because i'm simply inobservant :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(comments: look up)
oh did i mention that i learned if you leave your prompt field empty and use img2img on a chunk of existing image, it works as a very effective "alternative" of what currently exists, like a more literal mutate button and it's wonderful :D ...this has literally nothing to do with the PR, did i mention i'm inobservant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there better way to do this currently?
Hi, could you specify what exactly? I'm uncertain if there is a way for me to see what you are referring to... |
Are you talking about the body scroll fix? |
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
And this is probably less of a lack of attention and more that I kinda gave up on fixing small canvas offsets for now and just used a full-sized layer for the dream image insertion overlay: b2d51d4
That's cool! I need to play more with some of the features. |
lmao i'm bad at github, i warned you :P i meant my little brushed mask clearing fix 4dafe50; layers sensibly only permit deleting the whole thing, but i figured i might have missed a better way to manage the boundary box than a for loop |
const imgCanvas = imgLayer.canvas; // where dreams go | ||
const imgCtx = imgLayer.ctx; | ||
|
||
const maskPaintCanvas = maskPaintLayer.canvas; // where mouse cursor renders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I expose the mask layers with the same names as before, so using them as in the past should not be an issue.
Is this for clearing mask where the image was put? If so, that could use the ctx.clearRect() function. Should work wonders for clearing a square area! (ex: 4dafe50#r91620767)
All layers have both their canvas and context accessible, and for the main ones (mask for example) I continued exposing the canvas and Ctx with the same names as before for backwards compatibility, as seen in my previous line comment. So, don't be afraid to use the canvases as normal. |
your guidance is hugely appreciated as always, clearRect() is precisely what i should have been using the whole time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all systems go from my perspective :D
Added one more comment to your commit, regarding imagedata objects. |
I will then be merging the pull for now. |
i'll spiff up the readme tomorrow after work, many thanks again! |
This is a pull request for something that I have been working when I could these past few days. Most of the changes are regarding the new layer management lib. (yes, it should support implementation of photoshop/gimp style layering; no, I did not implement it)
It should make some things more efficient, and others easier. It also supports multi-resolution, (aligned layers with different resolutions), as well as canvas with different sizes (a step to infinity).
This is a draft for now, to test for potential bugs and because after the revamp there are some very annoying half-a-pixel offsets when putting images and things that I want to try fixing.