Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dynamicrafter notebook #2376

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,9 @@
"import open_clip\n",
"\n",
"\n",
"class CondStageModelWrapper:\n",
"class CondStageModelWrapper(torch.nn.Module):\n",
" def __init__(self, cond_stage_model):\n",
" super().__init__()\n",
" self.cond_stage_model = cond_stage_model\n",
"\n",
" def encode(self, tokens):\n",
Expand All @@ -571,8 +572,9 @@
" return torch.from_numpy(outs)\n",
"\n",
"\n",
"class EncoderFirstStageModelWrapper:\n",
"class EncoderFirstStageModelWrapper(torch.nn.Module):\n",
" def __init__(self, encode_first_stage):\n",
" super().__init__()\n",
" self.encode_first_stage = encode_first_stage\n",
"\n",
" def forward(self, x):\n",
Expand All @@ -584,8 +586,9 @@
" return self.forward(*args, **kwargs)\n",
"\n",
"\n",
"class EmbedderWrapper:\n",
"class EmbedderWrapper(torch.nn.Module):\n",
" def __init__(self, embedder):\n",
" super().__init__()\n",
" self.embedder = embedder\n",
"\n",
" def forward(self, x):\n",
Expand All @@ -597,8 +600,9 @@
" return self.forward(*args, **kwargs)\n",
"\n",
"\n",
"class CModelWrapper:\n",
"class CModelWrapper(torch.nn.Module):\n",
" def __init__(self, diffusion_model, out_channels):\n",
" super().__init__()\n",
" self.diffusion_model = diffusion_model\n",
" self.out_channels = out_channels\n",
"\n",
Expand All @@ -617,8 +621,9 @@
" return self.forward(*args, **kwargs)\n",
"\n",
"\n",
"class DecoderFirstStageModelWrapper:\n",
"class DecoderFirstStageModelWrapper(torch.nn.Module):\n",
" def __init__(self, decoder_first_stage):\n",
" super().__init__()\n",
" self.decoder_first_stage = decoder_first_stage\n",
"\n",
" def forward(self, x):\n",
Expand Down Expand Up @@ -1875,7 +1880,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.11.4"
},
"openvino_notebooks": {
"imageUrl": "https://github.com/Doubiiu/DynamiCrafter/blob/main/assets/showcase/guitar0.gif?raw=true",
Expand Down