-
Notifications
You must be signed in to change notification settings - Fork 6k
How to use dreamshaperXL10_alpha2Xl10.safetensors with controlnet-canny-sdxl-1.0 ? #4618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
How about converting dreamshaperXL10_alpha2Xl10.safetensors to diffuser pipeline? |
how to convert it to diffuser pipeline and use it in StableDiffusionXLControlNetPipeline ? |
Install diffusers from main branch and then see #4461. How to convert
How to use
|
Thanks a lot, I will try this. |
If you succeeded, could we close the issue? |
Hello ! Expected tensor for argument #1 'indices' to have one of the following scalar types: Long, Int; but got |
Here is the code controlnet = ControlNetModel.from_pretrained('diffusers/controlnet-canny-sdxl-1.0', torch_dtype=torch.float16) inputImg = Image.open("input/Body-kun-vador-canny.png").convert("RGB") output = pipe("darth vader holding his light saber in fighting position, trending on art station", negative_prompt='', image=inputImg, num_inference_steps=20, controlnet_conditioning_scale=0.75) This code works with "stabilityai/stable-diffusion-xl-base-1.0" but not dreamshaperXL10_alpha2Xl10. |
How did you run the conversion? We cannot reproduce what you posted above. |
I made a script, here is the code #!/bin/bash INPUT_FILE="models/Safetensors/dreamshaperXL10_alpha2Xl10.safetensors" python3 diffusers/scripts/convert_original_stable_diffusion_to_diffusers.py --checkpoint_path $INPUT_FILE --dump_path $OUTPUT_DIRECTORY --pipeline_class_name StableDiffusionXLPipeline --from_safetensors I have the same error when I run an inference with StableDiffusionXLPipeline and from_single_file to load the .safetensors model. I have a Mac Intel if this info can help. |
That script does not support converting SDXL ControlNets. |
I have copied the command line given by dai-ichiro and replaced the checkpoint_path and dump_path by my own values. |
I found the solution : I have updated some python modules (transformers and accelerate). |
Cool! Closing this issue then. It would be very nice, if you could post an end-to-end Colab Notebook here. I think that will benefit the community a lot. |
I want to use dreamshaperXL10_alpha2Xl10.safetensors with controlnet-canny-sdxl-1.0
I downloaded dreamshaperXL10_alpha2Xl10.safetensors file and tried to use :
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
'./dreamshaperXL10_alpha2Xl10.safetensors',
controlnet=controlnet,
use_safetensors=True,
torch_dtype=torch.float16,
variant="fp16"
)
got error :
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 908, in from_pretrained
cached_folder = cls.download(
File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 1330, in download
info = model_info(
File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 110, in _inner_fn
validate_repo_id(arg_value)
File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 158, in validate_repo_id
raise HFValidationError(
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': './dream/dreamshaperXL10_alpha2Xl10.safetensors'. Use repo_type argument if needed.
Previously, I tried to use from_single_file insteaed of from_pretrained.
Got error : from_single_file not available with StableDiffusionXLControlNetPipeline.
Please help.
Thanks
The text was updated successfully, but these errors were encountered: