Skip to content

Commit

Permalink
Simplify imports
Browse files Browse the repository at this point in the history
  • Loading branch information
btjanaka committed Sep 11, 2023
1 parent ae3db42 commit 5c13e3c
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions tutorials/tom_cruise_dqd.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,18 @@
},
"outputs": [],
"source": [
"# PyTorch\n",
"%pip install --upgrade torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html\n",
"# PyTorch, CLIP, pyribs, and others. ninja is needed for PyTorch C++ extensions\n",
"# for StyleGAN2.\n",
"%pip install torch torchvision git+https://github.com/openai/CLIP ribs ninja einops\n",
"\n",
"# CLIP\n",
"!git clone https://github.com/openai/CLIP\n",
"%pip install -e ./CLIP\n",
"\n",
"# StyleGAN\n",
"# StyleGAN2 - note that StyleGAN2 is not a Python package, so it cannot be\n",
"# installed with pip.\n",
"!git clone https://github.com/NVlabs/stylegan2-ada-pytorch.git\n",
"!curl -LO 'https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan2/versions/1/files/stylegan2-ffhq-256x256.pkl'\n",
"\n",
"# pyribs and others\n",
"%pip install ribs einops ninja timm\n",
"\n",
"# Add libraries to the system path.\n",
"import sys\n",
"sys.path.append(\"./CLIP\")\n",
"sys.path.append(\"./stylegan2-ada-pytorch\")"
"sys.path.append(\"./stylegan2-ada-pytorch\")\n",
"\n",
"# Download StyleGAN2 model.\n",
"!curl -LO 'https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan2/versions/1/files/stylegan2-ffhq-256x256.pkl'"
]
},
{
Expand Down Expand Up @@ -1090,7 +1084,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.13"
"version": "3.8.17"
},
"vscode": {
"interpreter": {
Expand Down

0 comments on commit 5c13e3c

Please sign in to comment.