config file is not a valid json file
File "Z:\software\python11\Lib\site-packages\diffusers\configuration_utils.py", line 436, in load_config raise EnvironmentError(f"It looks like the config file at '{config_file}' is not a valid JSON file.") OSError: It looks like the config file at 'X:\test\dreamshaper_8.safetensors' is not a valid JSON file.
why other diffusers doesnt have single file ?
pipe = AutoPipelineForInpainting.from_pretrained( test/dreamshaper_8.safetensors')
Try this:
pipe = StableDiffusionPipeline.from_single_file("test/dreamshaper_8.safetensors")
But, I couldn't use this pipe for inpainting :/
dreamshaper_8Inpainting.safetensors works for inpainting:
pipe = StableDiffusionInpaintPipeline.from_single_file("test/dreamshaper_8Inpainting.safetensors")
thnx for >.</ but is their for AutoPipelineForText2Image ,I2VGenXLPipeline ,StableVideoDiffusionPipeline
like they dont have single_file
Maybe this PR has something to do with it. https://github.com/huggingface/diffusers/pull/6986#issue-2136319703
Hi!
we won't be able to support single file with AutoPipelineForText2Image since the pipeline type need to be explicitly given for single checkpoint
for I2VGenXLPipeline and StableVideoDiffusionPipeline we are happy to support if there are single checkpoint available cc @DN6
Hi! we won't be able to support single file with
AutoPipelineForText2Imagesince the pipeline type need to be explicitly given for single checkpoint forI2VGenXLPipelineandStableVideoDiffusionPipelinewe are happy to support if there are single checkpoint available
@yiyixuxu This answers a question about an issue I've been having. However, I am mostly familiar with only needing a .safetensors file in order to run diffusion. Is this pipeline type something I can generate manually prior to attempting to instantiate a AutoPipelineForImage2Image.from_pretrained off a local safetensors file? Like, it's a json of some kind, right?
If you're going to store a config file why not just use the diffusers format? Which does exactly that and also allows to change the modules if you need to, for example the vae in SD 1.5 or the turbo o lighting versions of the unet in SDXL.
Most of the models right now have a diffusers version, for example the model you're using can just be loaded like this:
pipe = AutoPipelineForInpainting.from_pretrained("Lykon/dreamshaper-8")
If you need to have them locally in another directory, you can clone the repo if you want revisions or do a shallow clone if you only want the latest.
If you still want to do what you're suggesting, you'll need to use a file with each model and associate the corresponding pipeline to it, for example this one:
"_class_name": "StableDiffusionPipeline",
and then use the corresponding class to load the model, that's basically what the AutoPipeline does.
if you know the pipeline name, you can use the pipeline class with from_single_file. e.g
StableDiffusionImg2ImgPipeline.from_single_file(.safetensor)
or is there any particular reason you have to use the AutoPipeline?
AutoPipeline detects the pipeline class for you, so if you already know the class, you don't need it
thanks everyone i guess it resolved seems like video pipeline is not yet release any safetensor single file so far while not sure about gif i wonder if it can able to resolve in singilefile I2VGenXLPipeline