Update graph_decoder/diffusion_model.py
Browse files
graph_decoder/diffusion_model.py
CHANGED
@@ -1,20 +1,7 @@
|
|
1 |
-
# Copyright 2024 the Llamole team.
|
2 |
-
#
|
3 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
-
# you may not use this file except in compliance with the License.
|
5 |
-
# You may obtain a copy of the License at
|
6 |
-
#
|
7 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8 |
-
#
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
|
15 |
import os
|
16 |
import yaml
|
17 |
import json
|
|
|
18 |
|
19 |
import torch
|
20 |
import torch.nn as nn
|
@@ -234,6 +221,7 @@ class GraphDiT(nn.Module):
|
|
234 |
return noisy_data
|
235 |
|
236 |
@torch.no_grad()
|
|
|
237 |
def generate(
|
238 |
self,
|
239 |
properties,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
import yaml
|
3 |
import json
|
4 |
+
import spaces
|
5 |
|
6 |
import torch
|
7 |
import torch.nn as nn
|
|
|
221 |
return noisy_data
|
222 |
|
223 |
@torch.no_grad()
|
224 |
+
@spaces.GPU(duration=60)
|
225 |
def generate(
|
226 |
self,
|
227 |
properties,
|