apple / ml-stable-diffusion

Stable Diffusion with Core ML on Apple Silicon
MIT License
16.87k stars 942 forks source link

ValueError: Input X contains infinity or a value too large for dtype('float64'). #331

Open jaycoolslm opened 4 months ago

jaycoolslm commented 4 months ago

python -m python_coreml_stable_diffusion.torch2coreml --convert-unet --convert-text-encoder --convert-vae-decoder --convert-safety-checker --model-version CompVis/stable-diffusion-v1-4 --quantize-nbits 4 -o stable-diffusion-4bit

Running the above command triggers this error, specifically because it is being quantized.

This is a recurring issue ref #325 #303 #247 #246

I have tried downgrading transformers lib to 4.34.1 as suggested in other issues, however, diffusers currently has a dependency on it being higher

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. diffusers 0.29.0 requires huggingface-hub>=0.23.2, but you have huggingface-hub 0.17.3 which is incompatible.

Potential suggestion to resolve these issues from happening the future would be to have an up to date requirements.txt / https://github.com/apple/ml-stable-diffusion/blob/main/setup.py

kacperd commented 2 months ago

@jaycoolslm have you found a workaround for this issue?