Giter Site home page Giter Site logo

Masked diffusion example about controlnet HOT 6 OPEN

himmetozcan avatar himmetozcan commented on May 27, 2024 5
Masked diffusion example

from controlnet.

Comments (6)

AlextheEngineer avatar AlextheEngineer commented on May 27, 2024 2

I got background composition working by using the "encode_first_stage" function to encode the background image, then passing encoded background tensor as well as a mask to the "sample" function. Code snippet below:

Capture

from controlnet.

CesarERamosMedina avatar CesarERamosMedina commented on May 27, 2024 1

On this note, how would someone go about using both the original image unmodified + some other control like canny (using img2img instead of txt2img for the base SD). I'd like to preserve some color information that canny, hed, m-lsd, etc remove

from controlnet.

sausax avatar sausax commented on May 27, 2024

Looks like ldm module is similar to original SD code https://github.com/CompVis/stable-diffusion/tree/main/ldm. I am assuming the original img2img script should just work https://github.com/CompVis/stable-diffusion/blob/main/scripts/img2img.py. But still some code changes are required.

from controlnet.

adxalex avatar adxalex commented on May 27, 2024

Hi guyes, @himmetozcan when you say, you mean documentation right? Could you share whit the url? i'm new in stable diffusion and controlnet, i would like to understand how works each parameters. Thanks.

from controlnet.

tommy-qichang avatar tommy-qichang commented on May 27, 2024

Do we have any updates for masked diffusion example?
I think there's several options for inpainting or masked diffusion? Do we need to resize the x0 and mask to h//8 ,w//8 since it's LDM, but the channel number is unmatched, the random img has 4 channels, rather than 3.
Please shed some lights for us. Thanks.

from controlnet.

engrmusawarali avatar engrmusawarali commented on May 27, 2024

Hello! I am getting error in dimensions.

from controlnet.

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.