runpod / serverless-ckpt-template

🖼️ | Quickly deploy a custom RunPod Endpoint API using your own model ckpt.
MIT License
21 stars 3 forks source link

ValueError: Make sure to define a feature extractor when loading {self.__class__} #2

Closed xcreateadmin closed 1 year ago

xcreateadmin commented 1 year ago

Getting this error in:

2023-03-23T05:44:06.281771754Z Loading pipeline...
2023-03-23T05:44:12.228842220Z The config attributes {'scaling_factor': 0.18215} were passed to AutoencoderKL, but are not expected and will be ignored. Please verify your config.json configuration file.
2023-03-23T05:44:14.555284161Z Traceback (most recent call last):
2023-03-23T05:44:14.555358643Z   File "/opt/ckpt/runpod_infer.py", line 137, in <module>
2023-03-23T05:44:14.555385325Z     model_runner.setup()
2023-03-23T05:44:14.555400161Z   File "/opt/ckpt/sd_runner.py", line 42, in setup
2023-03-23T05:44:14.555417157Z     self.pipe = StableDiffusionPipeline.from_pretrained(
2023-03-23T05:44:14.555427364Z   File "/usr/local/lib/python3.8/dist-packages/diffusers/pipelines/pipeline_utils.py", line 760, in from_pretrained
2023-03-23T05:44:14.555687176Z     model = pipeline_class(**init_kwargs)
2023-03-23T05:44:14.555722878Z   File "/usr/local/lib/python3.8/dist-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py", line 129, in __init__
2023-03-23T05:44:14.555805136Z     raise ValueError(
2023-03-23T05:44:14.555830265Z ValueError: Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety checker. If you do not want to use the safety checker, you can pass 'safety_checker=None' instead.

HF Repo: https://huggingface.co/rdcoder/rd-model-test-v2/

Docker Image: https://hub.docker.com/repository/docker/rdcoder33/runpod_serverless_test/general

Input: '{"input": {"prompt": "a cute magical flying dog, fantasy art drawn by disney concept artists"}}'

justinmerrell commented 1 year ago

It appears that there was an issue with the safety checker for custom models, it is now disabled by default.

Tested your model by building: docker build --build-arg MODEL_URL=https://huggingface.co/rdcoder/rd-model-test-v2 -t runpod/serverless-ckpt-template:rd-model .