GithubHelp home page GithubHelp logo

Comments (7)

haofanwang avatar haofanwang commented on July 20, 2024 3

dreamshaper_8Inpainting.safetensors is not a SDXL model?

from diffusers.

asomoza avatar asomoza commented on July 20, 2024 3

I learned the hard way that almost never is the same code, that's why we kindly ask for the same minimal reproducible code you can share for the issues.

For example, just out of the box, you're using pillow (without the import?) and from_single_file and the example does not.

Nevertheless I tested it with the same model and with one that I know it worked before and I can reproduce this issue, it seems this happens with the from_single_file refactor and the single file inpaint checkpoints. Pinging @DN6 for this.

Probably this won't be resolved fast so I suggest you use a diffusers format one like this one or install the 0.27.2 version of diffusers.

P.S.: the pillow error is in the docs too, my mistake. cc: @stevhliu

from diffusers.

asomoza avatar asomoza commented on July 20, 2024 1

Hi, can you please post the code as text and not as an image, it makes it a lot harder to read and to test.

from diffusers.

xalteropsx avatar xalteropsx commented on July 20, 2024

@haofanwang thnx alot bro was mistakenly though xl

image

its pretty weird how it able to load the model without giving us warning xD

from diffusers.

xalteropsx avatar xalteropsx commented on July 20, 2024

@haofanwang sorry for trouble u again but it not load the sdxl model rather it load sd model

image

from diffusers.

xalteropsx avatar xalteropsx commented on July 20, 2024

@asomoza

import cv2
from diffusers import StableDiffusionXLControlNetInpaintPipeline, ControlNetModel, DDIMScheduler
from diffusers.utils import load_image
import numpy as np
import torch

init_image = load_image("https://huggingface.co/datasets/diffusers/test-arrays/resolve/main/stable_diffusion_inpaint/boy.png")

init_image = init_image.resize((1024, 1024))

generator = torch.Generator(device="cpu").manual_seed(1)

mask_image = load_image("https://huggingface.co/datasets/diffusers/test-arrays/resolve/main/stable_diffusion_inpaint/boy_mask.png")

mask_image = mask_image.resize((1024, 1024))
modelp = "models_painting/dreamshaperXL_lightningInpaint.safetensors"

def make_canny_condition(image):
    image = np.array(image)
    image = cv2.Canny(image, 100, 200)
    image = image[:, :, None]
    image = np.concatenate([image, image, image], axis=2)
    image = Image.fromarray(image)
    return image


control_image = make_canny_condition(init_image)

controlnet = ControlNetModel.from_pretrained("diffusers/controlnet-canny-sdxl-1.0",variant="fp16", torch_dtype=torch.float16)

pipe = StableDiffusionXLControlNetInpaintPipeline.from_single_file(modelp, controlnet=controlnet, torch_dtype=torch.float16)

pipe.enable_model_cpu_offload()

image = pipe(
    "a handsome man with ray-ban sunglasses",
    num_inference_steps=20,
    generator=generator,
    eta=1.0,
    image=init_image,
    mask_image=mask_image,
    control_image=control_image,
).images[0]

between bro it was same code of ur example was provided the link on top

havent tested with other model just low on space right now so only some inpaint model
https://civitai.com/models/403751/dreamshaper-xl-lightning-inpainting
but u can try with other xl model not sure if it work with singlefile

from diffusers.

xalteropsx avatar xalteropsx commented on July 20, 2024

ah thnx bro again guess will follow ur link >.</
sorry forget

from diffusers.

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.