Skip to content

Commit

Permalink
fix quantization dataset in dynamicrafter (#2410)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Sep 24, 2024
1 parent 94d6044 commit 4896dbb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1094,16 +1094,16 @@
" modified_model = CompiledModelDecorator(original_diffusion_model, keep_prob=1)\n",
" model.model.diffusion_model = CModelWrapper(modified_model, model.model.diffusion_model.out_channels)\n",
" \n",
" dataset = datasets.load_dataset(\"jovianzm/Pexels-400k\", split=\"train\", streaming=True).shuffle(seed=42).take(subset_size)\n",
" dataset = datasets.load_dataset(\"google-research-datasets/conceptual_captions\", trust_remote_code=True, split=\"train\", streaming=True).shuffle(seed=42).take(subset_size)\n",
" \n",
" pbar = tqdm(total=subset_size)\n",
" channels = model.model.diffusion_model.out_channels\n",
" frames = model.temporal_length\n",
" h, w = 256 // 8, 256 // 8\n",
" noise_shape = [1, channels, frames, h, w]\n",
" for batch in dataset:\n",
" prompt = batch[\"title\"]\n",
" image_path = batch[\"thumbnail\"]\n",
" prompt = batch[\"caption\"]\n",
" image_path = batch[\"image_url\"]\n",
" image = download_image(image_path)\n",
" if image is None:\n",
" continue\n",
Expand Down

0 comments on commit 4896dbb

Please sign in to comment.