Git Product home page Git Product logo

openoutpaint's People

Contributors

erjanmx avatar hangover3832 avatar kalekki avatar patrickas avatar ribawaja avatar seijihariki avatar vladmandic avatar zero01101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openoutpaint's Issues

layer visibility toggle affects wrong layer (bleeding edge branch)

Describe the bug
the eye icon to toggle layer visibility only affects the currently-selected layer, not the layer associated with toggle's row

To Reproduce

  • generate a dream
  • make a new layer
  • outpaint the dream
  • leaving the new layer selected, click the eye icon on the default image layer - it'll toggle the new layer instead

Expected behavior
appropriate layer is un/hidden

Screenshots
layer visibility

Desktop (please complete the following information):

  • OS: win10x64 22h2 build 19045.2251
  • Browser: firefox
  • Version: 107.0.1

Additional context
have done almost NO looking into it, my apologies, just something i noticed :/

[bug] Copy and paste not working for system clipboard-supporting browsers

As of now, to add the image I want to the canvas, I need to go through the process of Stamp image > Upload Image. Conversely, to export the image I worked on on the canvas, I have to download it by clicking Save canvas. I don't know if it's technically possible, but if possible, it would be nice to have a function to paste and copy image layers using ctrl + c / ctrl + v like in Photoshop. PaintHua supports a similar feature. https://github.com/BlinkDL/Hua

test.mp4

Insert a picture in the canvas

Very nice tool, thanks for making it!

I have a suggestion:

  • Add a button to insert a picture from your PC in the canvas like in Hua, or paste it (Ctrl+V) from the clipboard.

Edit: I realized that it's on the to-do list.

.git folder bloat

Discussed in #38

Originally posted by Kalekki November 23, 2022
So i noticed while doing git clone that it now downloads +148mb(!!!) which is odd since the massive gifs were removed.
image

image
How do we get rid of this bloat?

upscale button only seems to work on selected layer (bleeding edge branch)

i could probably figure out why this happens myself but figured i should make an issue before i forget this happens

steps to reproduce:

  • make a picture
  • make a new layer
  • make something in that new layer
  • save canvas (not upscale)
  • upscale canvas
  • select first layer
  • upscale canvas

regular save:
2022-12-05 01 24 33 openOutpaint image

upscale before i knew what was happening:
2022-12-05 01 24 37 openOutpaint image upscaler_R-ESRGAN 4x+

upscale after selecting base layer:
2022-12-05 01 25 15 openOutpaint image upscaler_R-ESRGAN 4x+

Rotate Canvas

Some models are trained on new stuff that look good when they are up straight. Once rotated, the model miss it up.

A great feature would be if we could rotate the canvas for the model so it gets it right.

Code AutoFormatting

Hey, I think it would be of great interest of the project for us to define some code formatting guidelines to allow for usage of prettier or eslint for auto-formatting. I think this could help keep the code clean.

We can keep many of our current trends (semicolon use, although currently not consistent) and 4 space indentation, but I think some limits of line lengths could help make the code a bit more readable, for example.

Metadata or log file with description of image design process

(The tool is really great as is! I'm enjoying using it a lot!)

It would be nice to see a line-by-line description of the process I used to create an image, so that I can learn which prompts and settings led to a good final image, for future reference.

Describe the solution you'd like
For each Dream or Img2img action that is successfully performed, create a line of text in a log file including:

  • the current Prompt Text (positive and negative)
  • name of Model file used (and Hypernetwork, if active)
  • Seed
  • Sampler
  • Steps
  • CFG
  • Resolution
  • Whether txt2img HRfix is turned on
  • if img2img, include Denoising Strength
  • (other relevant settings I might have forgotten about)

In case of a Mask being drawn, or use of Color Brush, or Layer manipulation, or any other actions, add a short line of text equivalent to what is recorded in the History bar.

(Optional: Remove log lines when its action is undone, but keep recently undone lines ready to add back in case of "redo". Alternatively, include the fact that "undo/redo" was used in the log file.)

When the user clicks "Save canvas", write out a log file with the same name as the image output file (different extension). Or, if the image file format is compatible, write the log text to the image metadata ("caption").

layer-based background removal

Is your feature request related to a problem? Please describe.
it is absolutely not

Describe the solution you'd like
so like when i was talking about difference globalcompositeoperation and failing at it in photoshop, i've since discovered what i meant was "background subtraction" and i still kinda think that'd be a nifty feature, like c'mon

no actually describe it dummy
oh uh so like if an in/outpaint dream or maybe even txt2img is requested with the "subtract background" option ticked, the following should occur:

  • all currently visible layers in the bounding box should be sampled to a new canvas or image
  • the dream is dreamed
  • the user approves a dreamed image
  • the dream image has the magic done to it from the aforementioned article against that new canvas/layer from step 1ish, has the identical pixels from the currently visible layers removed, and is placed onto a new layer of its own

the more i think about this, the more it sounds like it'll ONLY be useful for img2img because, uh, most people probably don't want a giant chunk of the "background" automagically smooshed into their new detail layer...

Describe alternatives you've considered
well i guess painstakingly erasing identical pixels would work if i wasn't impatient?

Additional context
i will 100% try and almost certainly fail to implement something like this myself, but uh, ahem don't let that stop anyone else from showing me who's boss ;)

priority
literally the lowest possible; like if there's an errant apostrophe in a readme 2 versions ago that's probably more important

test discord hooks

Is your feature request related to a problem? Please describe.
nope

Describe the solution you'd like
discord hooks to work

Describe alternatives you've considered
IRC lol

Additional context
testing testing

windows-native .devtools scripts

Is your feature request related to a problem? Please describe.
sorta but the problem is probably me

Describe the solution you'd like
windows-native scripts for .devtools folder because i hate NPM and don't want to think about it ever

Describe alternatives you've considered
abandoning software development entirely

Additional context
i'm a weenie

favicon.ico does not exist.

Once I installed the extention I a get this error:

RuntimeError: File at path E:\stable-diffusion-webui\extensions\openOutpaint-webUI-extension\app\pages\favicon.ico does not exist.

I try uninstalling and re-installing the extention and same error show

overmask kinda sucks

like the concept is really good and works GREAT in theory if i manually draw a mask over the region, but simply programmatically expanding the mask region just moves the seam instead of hiding it
bug

Img2img tool seems to be broken

Clicking on the img2img tool doesn't bring up the new img2img tool with the cool masks, instead it errors
image
Was there supposed to be an option in the contextmenu that somehow didnt get added?
This is what's in the context menu when selecting img2img tool
image

[Bug] Saving fails silently if canvas is too big

Describe the bug
Nothing happens when I click save if the canvas or the selection is too big (I forgot the exact number, but something around 3712 or a little under it was the maximum that got saved).

To Reproduce
Set canvas to 4096x4096, refresh the page to get the new size applied, generated all over, try to save. Also, select a region of similarly high size and try saving it.

Expected behavior
Any size should save, or at least provide a clear error message explaining what's going on if it fails.

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Firefox
  • Version: f279c84 commit from the testing branch (not sure if this is how I should specify it, I pulled right after seeing the message about it on issue #89 to test, as suggested there)

Mouse wheel and button should help select the right image after a batch is created

After a dream completes and the new controls [<] [>] [+] [Y] [N] are displayed under the reticle, I think it makes sense that when the mouse is placed inside the reticle in questions the mouse buttons / wheel interact with the controls.

Scrolling should move between possibilities as if we pressed the left right arrows.
Clicking the mouse wheel should generate a new set
Left click should accept
Right click should cancel.

This change should only happen when the mouse is over a reticle that has the controls displayed.
The reason is that the normal controls are not too useful in this situation and it makes sense to do the next logical steps (select the picture we want) with the mouse controls without having to hunt for the tiny controls and click them.

Once the image is selected or cancelled or once the user wanders outside of the reticle the controls go back to behaving normally.
Maybe a change in the cursor shape can indicate that we are in a special mode, in case we want to give visual indication of that.

I think the flow described is much more practical than the current one when working with big images

layers UI could use a scrollbar (bleeding edge branch)

Is your feature request related to a problem? Please describe.
the layers UI window needs a scrollbar because too many layers overflows it

Describe the solution you'd like
a scrollbar in the layers UI window

Describe alternatives you've considered
fewer layers? but telling people to not use the feature seems like a bad plan

Additional context
image

Firefox Slow for Large Canvas Sizes

Describe the bug
Brushes awfully slow in Firefox when canvas size is very big. The same issue does not seem to happen in chrome.

To Reproduce
Attempt to use a brush in a sufficiently large canvas for your computer. (For mine, 10000x10000 is already very noticeable). Issue seems proportional to size of canvas, not size of brush.

Expected behavior
As in chrome, lag should be proportional to brush size instead of canvas size.

Screenshots
No screenshots of the problem itself, but one of the profiler information of firefox.

image

It seems context moveTo functions are being very slow for some reason. (maybe Firefox fully redraws the canvas every frame when it changes?)

Desktop (please complete the following information):

  • OS: Endeavor OS (Arch Based Linux)
  • Browser Mozilla Firefox 107.0.1
  • Version: f279c84 - testing branch

image

Ability to queue multiple areas like with PaintHua

Sometimes I like to grow the image in small steps in multiple areas, with PaintHua I can keep clicking on new areas to be generated and it will start working on it as soon as the current area finishes generating, in the order the new areas were created; previous generated areas remain waiting confirmation, and if regenerations are requested they get into the queue.

Scale factor / other UI thoughts

I think it would make more sense to instead of showing scale factor in the UI, just show the resulting image size.
Also capturing scroll events while in mask mode for the purpose of changing the brush size to be independent of scale factor

[Feature] Keep Original Mask Contents

Describe the bug
When I try to inpaint an image and I make the square more than 512px, the image inside the square becomes lower res. I like making the "D" (Dream) square bigger because the bigger it is, the better the inpainting will be since the AI will have a clearer understanding of the whole image.

To Reproduce
Steps to reproduce the behavior:

Upload an image, inpaint part of it with the Mask Brush (M) tool, make the generation Dream (D) square 1024px (or any res higher than 512px, but 1024px is the most obvious) instead of the default 512px square by moving the mouse scroll wheel upwards, generate an image and compare before and after of what's inside the box.

Expected behavior
For the image that's not been masked and that's inside the "D" Dream square box not to become lower res and stay the same after generation

(First image is before generation, second image is after). See how the stars and city lights are lower res. This doesn't happen when the square is 512px. Even if I increase the square, the unmasked image inside the square shouldn't be affected but as you can see it is being affected

Screenshot (880)
Screenshot (881)

[Feature Request] Turning OpenOutpaint into an A1111 Extension

Is your feature request related to a problem? Please describe.
OpenOutpaint is a great idea. But having to run another app does not make the workflow seamless.

Describe the solution you'd like
Add OpenOutpaint as an extension to A1111. This will become a new "Outpaint" tab in the A1111 UI.

Describe alternatives you've considered
I guess you could edit the webui-user.bat file to run both A1111 and OpenOutpaint at the same time, but it is still not really seamless.

Additional context
It should be simple (I think) to build an iframe in a tab. So the changes to the codebase shouldn't be too big.

In the future it could have additional features such as sending a generated image from the "txt2img" tab to the "Outpaint" tab.

include_init_images - ERROR

Hi, when uploading the initial image, I always have this issue
obraz
and notice also the same issue after generating first IMG from prompt and trying out paint other grids then bam this issue appear
obraz

Better first use experience

I was reading new users' reddit posts and noticed some are complaining from the same things I had when I first used it.
Something that I think can be fixed with two changes to the UX
The complaints are along the lines of : "when i use it, it doesn't seem to match the image that i'm extending, it just makes a whole new image"

This is because the default value of Overmask px is 0
I am not sure if some people prefer the default to be zero but I personally always change it to something like 20 first thing when I load the interface.
I think a default that is different than zero is much better.

The second reason is that the currently set model in the automatic1111 ui is not an inpainting model so maybe also openOutpaint could look in the list and select an inpainting model by defalt if there is one, or at least issue a warning that the currently selected model is not an inpainting model which will cause more seams and less than ideal results.
This can be done by just checking if the model's name contains the word inpainting which should cover most of the cases.

What do you guys think? I feel those two minor changes will give a much better first time impression for new users.

Seed Viewing/Reusing

Is your feature request related to a problem? Please describe.
We almost forgot the feature that was requested on reddit for viewing/reusing the seed used for generation.

Describe the solution you'd like
As the API does not provide this value, we can try locally generating a seed, and using that to send to the API when seed is set to - 1.

brushed masks follow expanded canvas to new x/y origins

Describe the bug
after expanding the canvas upwards or to the left, any brushed masks use the new "0px origin" instead of where they're actually drawn

To Reproduce

  • start a new canvas or use one you're already painting on
  • press the leftward expand canvas button and expand it by 128 px
  • draw a new brushed mask on the image and engage it with txt/img2img
  • observe that it's too far left
  • realize that this probably happens on the y-axis too and you're bad at troubleshooting properly
  • expand the canvas 128px up
  • notice that nothing in the example images got changed at all after doing that

Expected behavior
the modified result should be where the mask is drawn instead of being offset by the new x-axis "zero point"

Screenshots
image
image
image
--after expanding vertically--
image

Desktop (please complete the following information):

  • OS: win10x64
  • Browser: firefox
  • Version 108.0.1x64

Prompts history

It would be nice to have an easy way to go back to a prompt I've recently used. That is all.

Overmasking Questions

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.

Option to automatically adjust resolution when cursor size is changed

I understand that there may be situations where having a different resolution than the cursor size might be necessary; but it is inconvenient to have to keep setting things twice when you are ok with the resolutions matching; so it would be useful to have a checkbox to make both settings stay in sync.

Allow non-square cursor and resolution

Sometimes you might wanna generate something in a long/thin area and shouldn't need to waste memory/processing power with a bunch of pixels are are not considered relevant. I think it would be good to have the option of setting non-square dimensions for the cursor and resolution.

Add "Restore Face" option

Is your feature request related to a problem? Please describe.
Sometimes you have faces in your inpaint/outpaint. And without Codeformer or GFPGAN, the faces usually have artifacts. So I propose the "Restore Face" option from the API to be added.

Describe the solution you'd like
New "Restore face" checkbox under the "Stable Diffusion settings" panel.

Additional context
Face restore is already one of the parameters we can specify in the txt2img & img2img API call. So there should be no additional logic required.

No square zone with cursor on Chrome.

When i open outpaint on Chrome there is no square frame on cursor, only regular cursor, so i cant see outpaint zone clearly.

To Reproduce:
Open: http://127.0.0.1:3456/ in Google Chrome v108.0.5359.99

Снимок 2022-12-12 04 33 47

On the OperaGX works as intended:
openOutpaint 🐠 - Opera 2022-12-12 04 44 09

  • OS: Windows 10
  • Browser: Google Chrome
  • Version 108.0.5359.99
  • WebUI up to date (updates each time i launch it).

Gradient masks also kind of work

I tried to fade out the mask going towards original image.

This is the initial image I am using.
landscape

I test this by outpainting the right half.
It's a liner gradient from black to white. Simply replacing lines from

overMaskCanvasCtx.fillStyle = "black";
to

with

let grd = overMaskCanvasCtx.createLinearGradient(0, 0, 255, 0);
grd.addColorStop(0, "black");
grd.addColorStop(1, "white");
overMaskCanvasCtx.fillStyle = grd;
overMaskCanvasCtx.fillRect(0, 0, 254, 512);

This is what the mask looks like
image

Problem is that it only affects half of the original image while making the outpainted portion black.
image

Idea behind trying this was that any outpaint should also effect original image a little bit depending on whats in the outpainted half of the image.

Scrolling/panning doesn't / can't work

Describe the bug

"To pan, hold CMD and the scroll wheel, then drag. To zoom, hold CMD and scroll."

My laptop doesn't have a scroll wheel. It's not clear how I would pan; I'm not aware of a way to create middle-click-and-drag events, and most applications use modifier keys instead.

Scrolling is a valid touch gesture, of course, but CMD-scroll also has no effect; the cursor size changes instead.

To Reproduce
Steps to reproduce the behavior:

  1. Buy a macbook
  2. Go to https://zero01101.github.io/openOutpaint/
  3. Attempt to zoom

Expected behavior

Functioning zoom.

Desktop (please complete the following information):

  • OS: OSX 12.5.1
  • Browser: Chrome / Safari
  • Version: Current as of 2022-12-23

Additional context

"Buy a macbook" is an unfortunate debugging instruction, and this will probably work if I connect an external mouse... I hope. However, maybe you could add a "pan" tool? I think "click m, click-drag" would be equally fast anyway.

Img2Img denoise strength bug?

Describe the bug
"Denoising Strength" below 0.7 results in a blurry image.
Used v1.5, v2.1[512] inpainting models with different samplers and steps

To Reproduce
Steps to reproduce the behavior:

  1. Set the 'Denoise Strength' level below 0.7.
  2. Regenerate some area
  3. See blurry square

Expected behavior
Same behavior as in WebUI-Inpainting

Screenshots
изображение

Environment (please complete the following information):

Model and Sampler dropdown list is blank.

Describe the bug
Even though my auto111 instance has plenty of models, as well as the recommended inpainting model, nothing shows up and no generation happens when attempting to generate an image.

Screenshots
Screenshot 2022-12-10 162450

Desktop (please complete the following information):

  • OS: windows 10
  • Browser: brave
  • Version auto ver. 44c46f0, openOutpaint ver. 0b2024d

Additional context
I've read through the setup instructions. Didn't see anything related to my issue.

Firstpass height and width with hi-res fix in img2img?

Discussed in #136

Originally posted by Drakmour December 30, 2022
I can't find where to put the initial resolution for hi-res fix in img2img of OpenOutpaint. Like firstpass height and width in text2img. Is there such option? I've read that right now it decrease the resolution x2 and then generate, but if my image is more than 1024 and is not square it still result in morbid multiple characters. I'd like to have an option to make firstpass 512x512 and then resize to my end resolution. It 99% works in text2img and should work in img2img. In text2img I get random result, while in img2img I can draw a sketch of pose of character myself to have much more control of the result.

Host on Github Pages

Since its a static site/app, please host this on github pages (Settings > Pages) so that we can have a look or even use it without needing to download and run our own server first.

Add mask in History

Is your feature request related to a problem? Please describe.
Problem is when I do ctrl + z to bring back the mask, it doesn't bring it back. Only brings back the previous generation (or the original pic)

Describe the solution you'd like
When doing ctrl + z after a generation that I clicked "Y" to, I want the previous generation come back while the mask that I've put stays in its place and doesn't go away. So basically can you please add the option of putting the mask history in "History" tab?

Local Storage Quota Reached on Resources

Describe the bug
If localStorage quota is reached, resources fail silently to synchronize.

To Reproduce
Just upload a lot of images to the stamp tool.

Expected behavior
Warn the user if quota is exceeded, and mark non-persisted images maybe? We should use IndexedDB for this too.

Screenshots
The console error for quota reached.
image

Desktop (please complete the following information):

  • OS: Endeavor OS (Arch Linux)
  • Browser Firefox 107.0.1
  • Version f279c84 (testing branch)

Additional context
Should probably use IndexedDB for this, as it almost as compatible as localStorage and allow for a much larger storage. Config should still use localStorage.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.