From 41c56dd6a7705a2dae09b5975b06eec9e9e57c28 Mon Sep 17 00:00:00 2001 From: Haihao Shen Date: Tue, 1 Nov 2022 15:22:54 +0800 Subject: [PATCH] Update README.md Enable CPU inference --- .../diffusion_model/diffusers/textual_inversion/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/pytorch/diffusion_model/diffusers/textual_inversion/README.md b/examples/pytorch/diffusion_model/diffusers/textual_inversion/README.md index d54a2707040..72bb0afa488 100644 --- a/examples/pytorch/diffusion_model/diffusers/textual_inversion/README.md +++ b/examples/pytorch/diffusion_model/diffusers/textual_inversion/README.md @@ -99,10 +99,10 @@ import torch model_id = "nezha_output" # use gpu -pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda") +# pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda") -# use cpu -# pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float) +# use cpu with FP32 +pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float) prompt = "a graffiti in a wall with a nezha on it"