Git Product home page Git Product logo

Comments (9)

psychedelicious avatar psychedelicious commented on May 30, 2024

I can't seem to reproduce this, or maybe I just don't see the issue. I've made dozens of images with x & y seamless, the same model and same or similar prompts. Can't see the line on any of them.

Here's a selection where the petals cross the central vertical axis of the image, where the line is visible:

Do you see any lines on these?

from invokeai.

KingsmanZer0 avatar KingsmanZer0 commented on May 30, 2024

I can't seem to reproduce this, or maybe I just don't see the issue. I've made dozens of images with x & y seamless, the same model and same or similar prompts. Can't see the line on any of them.

Here's a selection where the petals cross the central vertical axis of the image, where the line is visible:

you have to join the tile in photoshop to see the seam issue it. here i took your first image you generated and made a duplicate and joined the pattern and you can see the brown line on the flower. tried this in like auto1111 and does not have this issue.
seam line

from invokeai.

psychedelicious avatar psychedelicious commented on May 30, 2024

Ahh, sorry, I misunderstood the issue.

@RyanJDick @blessedcoolant I wonder if our seamless isn't quite right yet. I noticed that A1111 appears to do fully-circular tiling only. It's done by patching torch.nn.Conv2d's constructor. Very simple, but doesn't support tiling on individual axes.

There's a long-running diffusers issue about seamless, and here's the implementation that apparently was settled-on as working: huggingface/diffusers#556 (comment)

This is similar to ours, with some notable changes:

  • We skip some layers
  • We also patch nn.ConvTranspose2d
  • The diffusers implementation has special handling for LoRACompatibleConv layers

I don't understand this well enough to making any changes that aren't just guesses/experimentation.

from invokeai.

blessedcoolant avatar blessedcoolant commented on May 30, 2024

@psychedelicious #6344 Implemented here. Seems to be working. Give it a run.

from invokeai.

psychedelicious avatar psychedelicious commented on May 30, 2024

@blessedcoolant I'm asking why we skip a layer and handle the transpose layer, because the comments in the code seem to indicate that is important. At some point in the past, our implementation was like the diffusers one and we changed it to what we have now.

from invokeai.

blessedcoolant avatar blessedcoolant commented on May 30, 2024

@blessedcoolant I'm asking why we skip a layer and handle the transpose layer, because the comments in the code seem to indicate that is important. At some point in the past, our implementation was like the diffusers one and we changed it to what we have now.

@psychedelicious Because technically we also need to change the layers in the text_encoder for seamless .. but we just do UNet and VAE. So I'm guessing skipping the last layer was a sort of "fix" to mitigate some of the prompt importance in favor of seamlessness. I cannot really tell why it was done that way.

So far in my testing, I haven't found any cases where this new/old algo has failed. It's a lot simpler and clearer on what it does.

And I don't know why there was even a check for the transposed layers coz there's none in the UNet or the VAE.

from invokeai.

psychedelicious avatar psychedelicious commented on May 30, 2024

Ok. What if we patch torch directly like A1111 does? That would automatically apply to every model.

from invokeai.

blessedcoolant avatar blessedcoolant commented on May 30, 2024

@psychedelicious He doesn't actually use that function. He just applies circular padding to the layers as per requirement of the generation which is what needs be done and what we are doing right now. https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0/modules/sd_hijack.py#L311

from invokeai.

psychedelicious avatar psychedelicious commented on May 30, 2024

@blessedcoolant Ahhh I see. Thanks for clearing that up.

from invokeai.

Related Issues (20)

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.