Update README.md

This commit is contained in:
Patrick von Platen 2022-10-17 15:25:04 +02:00 committed by GitHub
parent ed6c61c6a0
commit 52e8fdb8ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ def download_image(url):
response = requests.get(url) response = requests.get(url)
return PIL.Image.open(BytesIO(response.content)).convert("RGB") return PIL.Image.open(BytesIO(response.content)).convert("RGB")
pipe = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", custom_pipeline="stable_diffusion_mega", dtype=torch.float16, revision="fp16") pipe = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", custom_pipeline="stable_diffusion_mega", torch_dtype=torch.float16, revision="fp16")
pipe.to("cuda") pipe.to("cuda")
pipe.enable_attention_slicing() pipe.enable_attention_slicing()