Skip to content

Conversation

@NightSpaceC
Copy link

@NightSpaceC NightSpaceC commented Dec 7, 2025

Description

I found that when I select a refiner model in the options of the script, it caused a error.

Traceback (most recent call last):
  File "D:\stable-diffusion-webui\modules\call_queue.py", line 57, in f
    res = list(func(*args, **kwargs))
  File "D:\stable-diffusion-webui\modules\call_queue.py", line 36, in f
    res = func(*args, **kwargs)
  File "D:\stable-diffusion-webui\modules\txt2img.py", line 52, in txt2img
    processed = modules.scripts.scripts_txt2img.run(p, *args)
  File "D:\stable-diffusion-webui\modules\scripts.py", line 601, in run
    processed = script.run(p, *script_args)
  File "D:\stable-diffusion-webui\scripts\openvino_accelerate.py", line 1277, in run
    processed = process_images_openvino(p, model_config, vae_ckpt, p.sampler_name, enable_caching, override_hires, upscaler, hires_steps, d_strength, openvino_device, mode, is_xl_ckpt, refiner_ckpt, refiner_frac)
  File "D:\stable-diffusion-webui\scripts\openvino_accelerate.py", line 919, in process_images_openvino
    shared.sd_refiner_model = get_diffusers_sd_refiner_model(model_config, vae_ckpt, sampler_name, enable_caching, openvino_device, mode, is_xl_ckpt, refiner_ckpt, refiner_frac)
  File "D:\stable-diffusion-webui\scripts\openvino_accelerate.py", line 679, in get_diffusers_sd_refiner_model
    refiner_model = StableDiffusionXLImg2ImgPipeline.from_single_file(refiner_checkpoint_path, use_safetensors=True, torch_dtype=torch.float32)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\diffusers\loaders.py", line 2822, in from_single_file
    pipe = download_from_original_stable_diffusion_ckpt(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\diffusers\pipelines\stable_diffusion\convert_from_ckpt.py", line 1670, in download_from_original_stable_diffusion_ckpt
    pipe = pipeline_class(
TypeError: StableDiffusionXLImg2ImgPipeline.__init__() got an unexpected keyword argument 'safety_checker'

It is because that the script use StableDiffusionXLImg2ImgPipeline.from_single_file to load the refiner model, but the constructor of StableDiffusionXLImg2ImgPipeline require different parameters.

I don't understand why this is the case, but when I replace the StableDiffusionXLImg2ImgPipeline with StableDiffusionImg2ImgPipeline, it works.

I also modify the .gitignore to ignore the cache

Screenshots/videos:

Checklist:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants