Error in Colab
Closed this issue · 3 comments
Jay4242 commented
loading diff model from '/content/drive/MyDrive/dreambooth_sd_models/MODEL-NAME/models/sks'
{'feature_extractor', 'safety_checker'} was not found in config. Values will be initialized to default values.
ftfy or spacy is not installed using BERT BasicTokenizer instead of ftfy.
Traceback (most recent call last):
File "./convert_diffusers_to_sd.py", line 746, in <module>
setup()
File "./convert_diffusers_to_sd.py", line 743, in setup
overwrite=args.overwrite, huggingface_use_auth_token=args.use_huggingface_auth_token)
File "./convert_diffusers_to_sd.py", line 713, in convert_diff_to_sd
diff_pipe = StableDiffusionPipeline.from_pretrained(diffusers_model_path, use_auth_token=huggingface_use_auth_token)
File "/usr/local/lib/python3.7/dist-packages/diffusers/pipeline_utils.py", line 391, in from_pretrained
model = pipeline_class(**init_kwargs)
TypeError: __init__() missing 2 required positional arguments: 'safety_checker' and 'feature_extractor'
idk what this is trying to tell me
In the colab I ran,
!wget -c "https://raw.githubusercontent.com/ratwithacompiler/diffusers_stablediff_conversion/main/convert_diffusers_to_sd.py"
!pip install torch diffusers transformers pytorch-lightning
Then, after downloading the sd-v1-4.ckpt, ran,
!python ./convert_diffusers_to_sd.py -u MY_TOKEN /content/drive/MyDrive/dreambooth_sd_models/MODEL-NAME/models/sks /content/sd-v1-4.ckpt /content/MODEL-NAME.ckpt
and it gave that error.
ratwithacompiler commented
Did you make that in the official hugging repo or with one of the forks like ShivamShrirao? I think some of those might remove stuff like the safety_checker which would explain that.
Jay4242 commented
Ah, I used the ShivamShrirao one.
ratwithacompiler commented
fixed that, should work now