ConsistentID
ConsistentID copied to clipboard
fyi - inference errors / for the default model it doesn't seem to have safetensor -
# TODO import base SD model and pretrained ConsistentID model
device = "cuda"
base_model_path = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
consistentID_path = "./ConsistentID_model_facemask_pretrain_50w" # pretrained ConsistentID model
# "philz1337/epicrealism" #
# Gets the absolute path of the current script
script_directory = os.path.dirname(os.path.realpath(__file__))
### Load base model
pipe = ConsistentIDStableDiffusionPipeline.from_pretrained(
base_model_path,
torch_dtype=torch.float16,
use_safetensors=False
).to(device)
safety_checker/model.safetensors not found
Traceback (most recent call last):
File "/media/oem/12TB/ConsistentID/infer.py", line 18, in safetensors
weights in {'safety_checker/pytorch_model.bin', 'text_encoder/pytorch_model.bin', 'unet/diffusion_pytorch_model.bin', 'vae/diffusion_pytorch_model.bin'} (variant=None)
Traceback (most recent call last):
File "/media/oem/12TB/ConsistentID/infer.py", line 18, in variant=fp16
, but no such modeling files are available.The default model files: {'safety_checker/pytorch_model.bin', 'text_encoder/pytorch_model.bin', 'vae/diffusion_pytorch_model.bin', 'unet/diffusion_pytorch_model.bin'} will be loaded instead. Make sure to not load from variant=fp16
if such variant modeling files are not available. Doing so will lead to an error in v0.24.0 as defaulting to non-variantmodeling files is deprecated.") should be removed since diffusers' version 0.24.0 is >= 0.24.0
Also there's no BiSeNet_pretrained_for_ConsistentID.pth - mentioned anywhere - could not find on huggingface -
I do see this ConsistentID_model_facemask_pretrain_50w.bin
code is saying self.bise_net_cp='./models/BiSeNet_pretrained_for_ConsistentID.pth' # Import BiSeNet model
UPDATE deleted file here https://github.com/JackAILab/ConsistentID/blob/2a0bc6d795be86a19b5c6f76b70e9aad2b204a58/models/BiSeNet_pretrained_for_ConsistentID.pth
UPDATE 2 this line file name is missing .bin extension consistentID_path = "./ConsistentID_model_facemask_pretrain_50w" # pretrained ConsistentID model
should be consistentID_path = "./ConsistentID_model_facemask_pretrain_50w.bin" # pretrained ConsistentID model
(maybe my install / conda environment - but I had to just cherry pick the code out of bisenet directory - was running with python -m infer.py) https://gist.github.com/johndpope/555319980017b5361fec01d224b76161
@johndpope Hi, i downloaded the weigths from https://huggingface.co/JackAILab/ConsistentID/tree/main
model and this part i change from
self.bise_net_cp='./models/BiSeNet_pretrained_for_ConsistentID.pth' # Import BiSeNet
to
self.bise_net_cp='./models/face_parsing.pth'