Comments (7)
dreamshaper_8Inpainting.safetensors
is not a SDXL model?
from diffusers.
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.
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.
@haofanwang thnx alot bro was mistakenly though xl
its pretty weird how it able to load the model without giving us warning xD
from diffusers.
@haofanwang sorry for trouble u again but it not load the sdxl model rather it load sd model
from diffusers.
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.
ah thnx bro again guess will follow ur link >.</
sorry forget
from diffusers.
Related Issues (20)
- Attention masks are missing in SD3 to mask out text padding tokens HOT 2
- Why do Diffusers schedulers produce lower quality outputs compared to ComfyUI? HOT 20
- `SDXLCFGCutoffCallback` does not work with `StableDiffusionXLControlNetPipeline` HOT 1
- A bug about one-step inference in PixArtAlphaPipeline HOT 2
- SD3 + SDXL refine fix lying on grass. How to do in diffusers colab workflow? HOT 1
- [PAG] add `StableDiffusionXLControlNetPAGImg2ImgPipeline` HOT 4
- PAG is now supported in core 🤗 HOT 4
- Trying to train sdxl text to image model, but getting the following error. HOT 5
- [SD3] vae.config.shift_factor missing in dreambooth training examples HOT 6
- Add PAG support to SD1.5 HOT 9
- Error thrown in `scheduling_dpmsolver_multistep` when re-used between validation steps HOT 5
- how to unload a pipeline HOT 3
- Error(s) in initializing SD3ControlNetModel by from_transformer HOT 9
- Text encoder errors in both SD3 dreambooth training scripts HOT 6
- Rethinking the `encode_prompt()` method in pipelines
- Using `torchsde.BrownianInterval` instead of `torchsde.BrownianTree` in class `BatchedBrownianTree` HOT 2
- Unexpected validation image on webdataset SDXL controlnet training script HOT 2
- Implementation of DDIM, why taking Xt and (t-1) as input? HOT 1
- Batched Text to image generation really slow with pipeline HOT 7
- Advanced training SD1.5 has an issue when saving checkpoints HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffusers.