Open onefish51 opened 1 year ago
.from_pretrained downloads from hugginface hub.
try this
open_pose = OpenposeDetector.from_pretrained("lllyasviel/ControlNet")
but I want to use local ckpt, which I downloaded
Hey @onefish51,
If you want to load the model locally, you should just do:
from controlnet_aux import OpenposeDetector
from controlnet_aux.open_pose.body import Body
body_model = Body("./diffusers/ControlNet/annotator/ckpts/body_pose_model.pth")
detector = OpenposeDetector(body_model)
if repo_id.count("/") > 1:
raise HFValidationError(
"Repo id must be in the form 'repo_name' or 'namespace/repo_name':"
f" '{repo_id}'. Use `repo_type` argument if needed."
)
Hey @depyronick,
Could you maybe open a new issue with a reproducible error message?
Hey @depyronick,
Could you maybe open a new issue with a reproducible error message?
huggingface_hub
module raises an error if pretrained_model_or_path
has more than one /
in it. because of that we cannot use from_pretrained
methods for specifying local paths.
your previous example works, but it's the case for all other type of nets.
e.g. for scribble should also use (instead from_pretrained
):
network_model = Network('./controlnets/net/annotator/ckpts/network-bsds500.pth')
hed = HEDdetector(network_model)
image = hed(image, scribble=True)
i've no issue on this, just a reminder for future explorers.
when I load local ckpt
a error occurred :