Skip to content

OSError: (random module) does not appear to have a file named model_index.json. #5578

@tin2tin

Description

@tin2tin

Describe the bug

Using this example:

from diffusers import StableDiffusionControlNetImg2ImgPipeline, ControlNetModel, UniPCMultistepScheduler
import torch

controlnet = ControlNetModel.from_pretrained("lllyasviel/control_v11f1p_sd15_depth", torch_dtype=torch.float16, use_safetensors=True)
pipe = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
    "runwayml/stable-diffusion-v1-5", controlnet=controlnet, torch_dtype=torch.float16, use_safetensors=True
).to("cuda")

pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
pipe.enable_model_cpu_offload()
output = pipe(
    "lego batman and robin", image=image, control_image=depth_map,
).images[0]

From:
https://huggingface.co/docs/diffusers/main/en/using-diffusers/controlnet#image-to-image

Throws this error:

OSError: lllyasviel/control_v11f1p_sd15_depth does not appear to have a file named config.json.

Reproduction

Run the code from the documentation example above.

Logs

No response

System Info

Win 11

Who can help?

@sayakpaul @yiyixuxu @DN6 @patrickvonplaten @stevhliu

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions