nicknochnack / StableDiffusionApp

102 stars 82 forks source link

How to setup for "cpu"? #6

Open Muhammad-Ahsan-Rasheed opened 1 year ago

Muhammad-Ahsan-Rasheed commented 1 year ago

I tried running the app for cpu but can't. Is there anyway to setup the model and app for cpu.

return torch.layer_norm(input, normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled)
RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'
jcortesebustos commented 1 year ago

python -m pip install tensorflow-metal python -m pip install accelerate & Pipelines loaded with torch_dtype=torch.float16 cannot run with cpu device. It is not recommended to move them to cpu as running them will fail. Please make sure to use an accelerator to run the pipeline in inference, due to the lack of support forfloat16 operations on this device in PyTorch. Please, remove the torch_dtype=torch.float16 argument