Spaces:
Running
on
Zero
Running
on
Zero
unknown
commited on
Commit
•
60a35ef
1
Parent(s):
4d02e02
gpu
Browse files
app.py
CHANGED
@@ -69,6 +69,7 @@ class FoleyController:
|
|
69 |
self.pipeline = None
|
70 |
|
71 |
self.loaded = False
|
|
|
72 |
self.load_model()
|
73 |
|
74 |
def load_model(self):
|
@@ -137,7 +138,7 @@ class FoleyController:
|
|
137 |
sample_step_slider,
|
138 |
cfg_scale_slider,
|
139 |
seed_textbox,
|
140 |
-
):
|
141 |
# move to gpu
|
142 |
self.time_detector.to(self.device)
|
143 |
self.pipeline.to(self.device)
|
@@ -150,8 +151,8 @@ class FoleyController:
|
|
150 |
torchvision.transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
|
151 |
]
|
152 |
video_transform = torchvision.transforms.Compose(vision_transform_list)
|
153 |
-
if not self.loaded:
|
154 |
-
|
155 |
generator = torch.Generator()
|
156 |
if seed_textbox != "":
|
157 |
torch.manual_seed(int(seed_textbox))
|
|
|
69 |
self.pipeline = None
|
70 |
|
71 |
self.loaded = False
|
72 |
+
|
73 |
self.load_model()
|
74 |
|
75 |
def load_model(self):
|
|
|
138 |
sample_step_slider,
|
139 |
cfg_scale_slider,
|
140 |
seed_textbox,
|
141 |
+
):
|
142 |
# move to gpu
|
143 |
self.time_detector.to(self.device)
|
144 |
self.pipeline.to(self.device)
|
|
|
151 |
torchvision.transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
|
152 |
]
|
153 |
video_transform = torchvision.transforms.Compose(vision_transform_list)
|
154 |
+
# if not self.loaded:
|
155 |
+
# raise gr.Error("Error with loading model")
|
156 |
generator = torch.Generator()
|
157 |
if seed_textbox != "":
|
158 |
torch.manual_seed(int(seed_textbox))
|