Skip to content

Commit

Permalink
Update Reconstructions.ipynb
Browse files Browse the repository at this point in the history
vd_pipe needed to be float16
  • Loading branch information
PaulScotti authored Oct 21, 2023
1 parent 59d95dd commit 4d02ab3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Reconstructions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@
"from diffusers import VersatileDiffusionDualGuidedPipeline, UniPCMultistepScheduler\n",
"from diffusers.models import DualTransformer2DModel\n",
"try:\n",
" vd_pipe = VersatileDiffusionDualGuidedPipeline.from_pretrained(vd_cache_dir).to(device)\n",
" vd_pipe = VersatileDiffusionDualGuidedPipeline.from_pretrained(vd_cache_dir).to(device).to(torch.float16)\n",
"except:\n",
" print(\"Downloading Versatile Diffusion to\", vd_cache_dir)\n",
" vd_pipe = VersatileDiffusionDualGuidedPipeline.from_pretrained(\n",
" \"shi-labs/versatile-diffusion\",\n",
" cache_dir = vd_cache_dir).to(device)\n",
" cache_dir = vd_cache_dir).to(device).to(torch.float16)\n",
"vd_pipe.image_unet.eval()\n",
"vd_pipe.vae.eval()\n",
"vd_pipe.image_unet.requires_grad_(False)\n",
Expand Down

0 comments on commit 4d02ab3

Please sign in to comment.