We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can anyone has a controlnmet_aux's preload function for preprocessors of lineart and depth ,etc, thanks a lot!!!
class LineartDetector: def __init__(self, model, coarse_model): self.model = model self.model_coarse = coarse_model self.device = "cuda:0" print("test0,controlnet_aux,LineartDetector,cuda0:{}",time.ctime()) @classmethod def from_pretrained(cls, pretrained_model_or_path=HF_MODEL_NAME, filename="sk_model.pth", coarse_filename="sk_model2.pth"): print("test0,controlnet_aux,LineartDetector,from_pretrained,cuda0:{}",time.ctime()) model_path = custom_hf_download(pretrained_model_or_path, filename) coarse_model_path = custom_hf_download(pretrained_model_or_path, coarse_filename) model = Generator(3, 1, 3) model.load_state_dict(torch.load(model_path, map_location=torch.device('cuda:0'))) model.eval() coarse_model = Generator(3, 1, 3) coarse_model.load_state_dict(torch.load(coarse_model_path, map_location=torch.device('cuda:0'))) coarse_model.eval() return cls(model, coarse_model)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
can anyone has a controlnmet_aux's preload function for preprocessors of lineart and depth ,etc, thanks a lot!!!
The text was updated successfully, but these errors were encountered: