Coder Social home page Coder Social logo

sd-webui-photopea-embed's People

Contributors

yankooliveira 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  avatar

sd-webui-photopea-embed's Issues

[Feature Request]: Controlnet masking for replacement Adobe Firefly Generative Fill

Here are some new control net features instructions.
Mikubill/sd-webui-controlnet#1464
The above functionality shows how to use Controlnet to mimic Adobe Firefly Generative Fill.

As a replacement for Adobe Firefly Generative Fill, how about adding the ability to send the same functionality as inpaint selection to text to image control net?

Currently, Controlnet's masking capabilities are clearly limited to completely masking the desired area.

[Bug] Not correctly handle layer.typename

Following code has issue checking whether a layer is of type LayerSet.

    // Gets all layers recursively, including the ones inside folders.
    function getAllArtLayers (document, layerCollection){
        for (var i = 0; i < document.layers.length; i++){
            var currentLayer = document.layers[i];
            if (currentLayer.typename === "ArtLayer"){
                layerCollection.push(currentLayer);
            } else {
                getAllArtLayers(currentLayer, layerCollection);
            }
        }
        return layerCollection;
    }

There are many other layer types other than ArtLayer and LayerSet:

  1. ArtLayer: This is the most basic type of layer, containing raster images, text, or solid colors.

  2. LayerSet: A layer set, or a group of layers, which can contain other ArtLayers or LayerSets.

  3. TextItem: This represents a text layer. It is not a type of layer by itself, but an object contained in an ArtLayer that you can manipulate if the ArtLayer.kind property is LayerKind.TEXT.

  4. SolidFill: This represents a solid color fill layer. Similar to TextItem, it's an object you would manipulate if ArtLayer.kind is LayerKind.SOLIDFILL.

  5. SmartObjectLayer: This represents a Smart Object layer. Smart Objects are layers that contain image data from raster or vector images, and they preserve an image’s source content with all its original characteristics.

  6. AdjustmentLayer: This represents an adjustment layer. Adjustment layers are used to apply color and tonal adjustments without permanently changing the underlying pixel values.

So if any of those layers appears on the canvas but don't have layers defined on them, the program will error out.

no selection in active document

I can't send the image over to inpaint.

all the other buttons work such as:

  1. send to img2img controlnet
  2. send to extras
  3. send to txt2img controlnet
  4. send to img2img

inpaint selection I get a "no selection in active document"

DBFE3330-316F-44F0-9834-3712830C7AF9.MP4

Add the button to send from extras(upscale tab) to photopea

Add the button to send from upscale tab to photopea. It would have been extremely nice if that button had been there.
изображение
Right now I only see the button from the photopea tab in extras. If there was a send button from extras, this case would work:

txt2img -> photopea(edit some part) -> extras -> back to photopea with upscaled image.

When using the --hide-ui-dir-config parameter, [Send to Photopea] button is not displayed.

In the photopea-bindings.js file at line 32, this code generates the [Send to Photopea] button:

function createSendToPhotopeaButton(queryId, gallery) {
    const existingButton = gradioApp().querySelector(`#${queryId} button`);
    const newButton = existingButton.cloneNode(true);
    newButton.id = `${queryId}_open_in_photopea`;
    newButton.textContent = "Send to Photopea";
    newButton.addEventListener("click", () => openImageInPhotopea(gallery));
    gradioApp().querySelector(`#${queryId}`).appendChild(newButton);
}

It clones the first button inside #${queryId}, which is [Open images output directory] button.

When using the --hide-ui-dir-config parameter, this button is hidden, and the cloned [Send to Photopea] button is also hidden.

Set display to "flex" in createSendToPhotopeaButton should solve this problem:

newButton.style.display = "flex";

Magic Replace tool

Will you be adding an update allowing the new Magic Replace tool to be visible/active? I see it on the online version, but it is not loading in the Stable Diffusion version.
magicReplace

Working window width

The width of the entire iFrame is reserved, but the width of the working Window is narrow. Is there any way to fix this?

2023-06-14_0000_NoName

Sending to "inpaint upload" doesn't work

I can use all other functions, but sending a active selection in photopea to "inpaint upload" doesn't work. I deactivated my other extensions and restarted A1111, but that didn't change anything
This both doesn't work on Opera and Chrome Browser under Windows 11 for me

send to inpaint is missing...

Theres only send to img2img and inpaint upload, but not send to inpaint which is the one i personally use the most, can you add that in?

Can't normalize the view

Screenshot 2023-10-12 220832
When I load Automatic1111 I have a window almost fully occupied by a "grey" zone. I can't remove or slide it aside so my working area stays drastically small. If I send a image from img2img it just appears in a small area on the left side.
I tried to delete extention and re-install it but all is the same. Updated to latest version of photopea
Before it was ok, I had no issues

[Feature Request] Inpaint masked instead of selected

Selection is often short-lived, and users generally have less control on the selection than mask on an image. Should we consider use the actual mask attached to the image in Photopea as the inpaint mask in A1111?

[Feature Request]: Support tablets

Using a mouse when trying to "paint" delicate forms can get quite cumbersome fast.
I would like to suggest to support pens and tablets like we use in Photoshop. If necessary even as a checkbox option to switch on and off.
Would be really great! 🙂

bilingual-localization break 'Inpaint selection' button

My main language is Chinese, so I have been using [bilingual-localization] to display both Chinese and English.

In the file photopea-bindings.js, at line 63, the [Inpaint selection] button get Inpaint tab using the following code:

Array.from(allButtons).find(button => button.textContent === 'Inpaint upload ');

However, [bilingual-localization] changes the value of textContent to '修復上傳 Inpaint upload ', which causes [Inpaint selection] can't find the Inpaint tab and therefore not work correctly.

In my own copy, I have modified it to:

Array.from(allButtons).find(button => button.textContent.endsWith('Inpaint upload '));

This works fine for me, but there might be other users who did not using bilingual-localization but the original localization feature of SD-WebUI.
This could result in the disappearance of the latter part of 'Inpaint upload ', leaving only the text in another language.
Using 'endsWith' might not be a solution for them.

Is there a more precise way to get Inpaint tab that avoids the localization break [Inpaint selection] functionality?

Can't see the layers panel on a zoomed page :-)

My laptop's screen resolution is 2560x1440. So I need to load pages in FF in 133%. And I don't see the layers panel. Only the canvas and the left side of photopea. Even if I toggle page width resizing the window, Photopea will not resize its frame.

If I reload my webui in 100% scale and open Photopea then all works fine. Even if I rescale it back in 133% - I see all the Photopea panels in 133%.

Is it possible to change the frame width or something like that? :-)

Interface looks wired

After installing the extension and reloading the ui, the photopea interface shows like below.截屏2023-06-13 14 30 31

"Sent to" buttons are broken

Steps:

  1. Generate image on txt2img tab
  2. Sent to photopea
  3. Press send to img2img / send to extras tab
    Expected result: Image is visible and you can work with it
    Actual result:
    Image is not loaded
    image

Same happens if you add step 2.1: Select part of and object and click to inpaint selection. It never loads both image and mask properly

Here is some console output.
File "D:\automatic-stable-diffusion\system\python\lib\site-packages\gradio\processing_utils.py", line 59, in decode_base64_to_image
img = Image.open(BytesIO(base64.b64decode(image_encoded)))
File "D:\automatic-stable-diffusion\system\python\lib\site-packages\PIL\Image.py", line 3298, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x000001A5DC5EE930>

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.