TencentARC / PhotoMaker

PhotoMaker
https://photo-maker.github.io/
Other
8.63k stars 676 forks source link

style_demo.ipynb文件,这些写死的模型的路径,window本地跑起来直接报错 #70

Open jiehwa opened 5 months ago

jiehwa commented 5 months ago

image

image

machineminded commented 5 months ago

Yeah - I was just about to open an issue about this. It appears that PhotoMakerStableDiffusionXLPipeline does not support a local safetensors format. We would have to convert the model to diffusers I think. However, the diffusers StableDiffusionXLPipeline does support the safetensors format, so not sure what is going on here.

For example, this works:

 pipe = StableDiffusionXLPipeline.from_single_file(
     base_model_path, revision="fp16", variant="fp16", torch_dtype=torch.float16, scheduler="dpm"
 )
 pipe.scheduler =  UniPCMultistepScheduler.from_config(pipe.scheduler.config)
 pipe.to("cuda")

This does not:

pipe = PhotoMakerStableDiffusionXLPipeline.from_pretrained(
    base_model_path,  # can change to any base model based on SDXL
    torch_dtype=torch.bfloat16, 
    use_safetensors=True, 
    variant="fp16"
).to("cuda")

and returns this error

ValueError: The provided pretrained_model_name_or_path "E:/github/stable-diffusion-webui/models/Stable-diffusion/sdxl/sd_xl_base_1.0_0.9vae.safetensors" is neither a valid local path nor a valid repo id. Please check the parameter.

The file exists.

Paper99 commented 5 months ago

Download corresponding safetensors file to ./civitai_models