Skip to content

Commit

Permalink
bye bye filter 👋
Browse files Browse the repository at this point in the history
  • Loading branch information
camenduru authored Nov 22, 2023
1 parent c1c79b1 commit 2578690
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions stable_video_diffusion_fp16_colab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"\n",
"sys.path.append(\"generative-models\")\n",
"from sgm.util import default, instantiate_from_config\n",
"from scripts.util.detection.nsfw_and_watermark_dectection import DeepFloydDataFiltering\n",
"\n",
"def load_model(\n",
" config: str,\n",
Expand All @@ -56,8 +55,7 @@
" with torch.device(device):\n",
" model = instantiate_from_config(config.model).to(device).eval().requires_grad_(False)\n",
"\n",
" filter = DeepFloydDataFiltering(verbose=False, device=device)\n",
" return model, filter\n",
" return model\n",
"\n",
"version = \"svd_xt\"\n",
"if version == \"svd\":\n",
Expand All @@ -74,7 +72,7 @@
" raise ValueError(f\"Version {version} does not exist.\")\n",
"\n",
"device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n",
"model, filter = load_model(\n",
"model = load_model(\n",
" model_config,\n",
" device,\n",
" num_frames,\n",
Expand Down Expand Up @@ -313,7 +311,6 @@
" )\n",
"\n",
" samples = embed_watermark(samples)\n",
" samples = filter(samples)\n",
" vid = (\n",
" (rearrange(samples, \"t c h w -> t h w c\") * 255)\n",
" .cpu()\n",
Expand Down

0 comments on commit 2578690

Please sign in to comment.