yankooliveira / sd-webui-photopea-embed Goto Github PK
View Code? Open in Web Editor NEWA simple Stable Diffusion WebUI extension that adds a Photopea tab and integration.
License: Other
A simple Stable Diffusion WebUI extension that adds a Photopea tab and integration.
License: Other
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
:
ArtLayer
: This is the most basic type of layer, containing raster images, text, or solid colors.
LayerSet
: A layer set, or a group of layers, which can contain other ArtLayer
s or LayerSet
s.
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
.
SolidFill
: This represents a solid color fill layer. Similar to TextItem
, it's an object you would manipulate if ArtLayer.kind
is LayerKind.SOLIDFILL
.
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.
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.
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
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?
Seems not to send anything to ControlNet in the latest versions using the "Send to" buttons. Send to Img2Img & Send to Extras seem to be working fine.
Thanks for your work.
After recent updates, the remove background option in photopia is no longer accessible.
It remains greyed out without the ability to use the feature.
The feature still works on the web version of photopia.
would be great if this could work with offline versions like https://github.com/suzuke/photopea
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! 🙂
I can't send the image over to inpaint.
all the other buttons work such as:
inpaint selection I get a "no selection in active document"
how to open photopea in fullscreen?
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";
Steps:
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>
const inpaintButton = Array.from(allButtons).find(button => button.textContent === 'Inpaint upload ');
This code can not find the [Inpaint upload] button.
Seem any localization extension that translate the 'inpaint upload' will break the 'Inpaint selection' button.
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?
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
A Affinity photo version would be a game changer, affinity photo is a great onetime payment alternative to photoshop.
I hope I can choose to use the local model.
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.
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?
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.
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? :-)
The button sent to photopea stooped working after an update of https://github.com/vladmandic/automatic, but there is no reaction when pressed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.