dfaker / sd-latent-mirroring Goto Github PK
View Code? Open in Web Editor NEWApplies mirroring and flips to the latent images to produce anything from subtle balanced compositions to perfect reflections
Applies mirroring and flips to the latent images to produce anything from subtle balanced compositions to perfect reflections
Hey guys, not an engineer, but an artist
Found this repo from a discussion yesterday about the lack of Dynamic Symmetry being used by StableDiffusion
I was quite abrasive on that discussion so please forgive me for that, but, it is very much something that I would love to have, as I use it daily on my job and work, having SD "somehow" use the armatures of Dynamic Symmetry would be just incredible, as Midjourney makes strong use of it already, and it is one of the strong qualities which make Midjourney be stronger on the technical aesthetics side than SD currently is
Here's an example from a classical painting teacher showing what Dynamic Symmetry is and how it is used in paintings
Having a way to control the "fit" of shapes, and diagonals alongside the lines of Dynamic Symmetry would be indeed amazing, but I just dont know how possible it even is! So would be interested on this discussion and what you guys think about it
If you need SVG files to use let me know.
Here are some links for looking around if interested.
(Using Archive links for archival purposes because the website might be shutting down in some days from now ๐)
Anyhow, would love to hear what you guys might have to say about this, as I dont really have got the backdrop to know the feasibility of it
Forgive me if I missunderstand how this all works, so if this isn't a rational request...
Could you make an option or perhaps an extension that zooms the latent space in or out, something like this could improve character generation and keep it from cutting off heads and feet.
In addition or alternatively - add the ability to pan the latent space during generation?
Error message: RuntimeError: The expanded size of the tensor (64) must match the existing size (96) at non-singleton dimension 3.
log:
25%|โโโโโโโโโโโโโโโโโโโโโโโโโโ | 7/28 [00:12<00:36, 1.74s/it]Error executing callback cfg_denoiser_callback for C:\stable-diffusion\stable-diffusion-webui\extensions\SD-latent-mirroring\scripts\latent_mirroring.py
Traceback (most recent call last):
File "C:\stable-diffusion\stable-diffusion-webui\modules\script_callbacks.py", line 135, in cfg_denoiser_callback
c.callback(params)
File "C:\stable-diffusion\stable-diffusion-webui\extensions\SD-latent-mirroring\scripts\latent_mirroring.py", line 34, in denoise_callback
params.x[:, :, :, :] = torch.rot90(params.x, dims=[2, 3])
RuntimeError: The expanded size of the tensor (64) must match the existing size (96) at non-singleton dimension 3. Target sizes: [2, 4, 96, 64]. Tensor sizes: [2, 4, 64, 96]
Error Message: RuntimeError: The size of tensor a (128) must match the size of tensor b (96) at non-singleton dimension 3
Log:
25%|โโโโโโโโโโโโโโโโโโโโโโโโโโ | 7/28 [00:30<01:30, 4.30s/it]Error executing callback cfg_denoiser_callback for C:\stable-diffusion\stable-diffusion-webui\extensions\SD-latent-mirroring\scripts\latent_mirroring.py
Traceback (most recent call last):
File "C:\stable-diffusion\stable-diffusion-webui\modules\script_callbacks.py", line 135, in cfg_denoiser_callback
c.callback(params)
File "C:\stable-diffusion\stable-diffusion-webui\extensions\SD-latent-mirroring\scripts\latent_mirroring.py", line 48, in denoise_callback
params.x[:, :, :, :] = (torch.rot90(params.x, dims=[2, 3]) + params.x)/2
RuntimeError: The size of tensor a (128) must match the size of tensor b (96) at non-singleton dimension 3
So you can flip from right to left, down to up, etc.
Hi there! Is there any way to use this with highres fix where it won't apply to the second round? When applied to the second round it makes the image blurry and slightly doubled and thus doesn't work well. Thanks again for your wonderful extension!
Hi there,
Been trying to use this with the sd 2.0 model and am not getting much if any effect. Am I doing something wrong?
Hey! I wanna start out by saying that I don't mean to nitpick, I just wanted to share this feedback because I like this extension and will likely be using it regularly. Plus, any solution to this problem would likely be relatively easy to fix, compared to usual bugfixes.
The problem, in more detail: Image editing programs like Photoshop, Clip Studio Paint, and all others that I have used, use the terms "horizontal" and "vertical" mirroring to describe the inverse operation, relative to this extension; usually mirroring something horizontally means to mirror it along the vertical axis, so that the left becomes the right, and vice versa (left->right, horizontal direction). And, mirroring something vertically means to mirror it along the horizontal axis, so that the top becomes the bottom, and vice versa (top->bottom, vertical direction). This extension reverses those meanings so that horizontal mirroring flips things along the horizon, and vertical mirroring flips things along the vertical axis.
Suggested solution: if it were me, I'd probably simply reverse the terms in the software for constancy with other image editing software. But, if you do not want to do that, I think adding some short help text above, (or on hover) the generation options would avoid confusion, too :)
Please add image flipping so it would be possible to can change direction where characters are facing, when they all facing in a single direction all the time. Often adding to the prompt 'facing right' doesn't help at all, and mirroring would be very helpful.
edit: wrong repo
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.