Spaces:
Runtime error
Runtime error
Commit
·
bde4ec6
1
Parent(s):
260af6f
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -7,6 +7,7 @@ from PIL import Image
|
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
import json
|
| 9 |
import os
|
|
|
|
| 10 |
|
| 11 |
def load_model_from_config(config_path, model_name, device='cuda'):
|
| 12 |
# Load the config file
|
|
@@ -39,6 +40,9 @@ def sample_frame(model: LatentDiffusion, prompt: str, image_sequence: torch.Tens
|
|
| 39 |
c = model.get_learned_conditioning(c_dict)
|
| 40 |
c = model.enc_concat_seq(c, c_dict, 'c_concat')
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
samples_ddim = model.p_sample_loop(cond=c, shape=[1, 3, 64, 64], return_intermediates=False, verbose=True)
|
| 43 |
#samples_ddim, _ = sampler.sample(S=999,
|
| 44 |
# conditioning=c,
|
|
|
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
import json
|
| 9 |
import os
|
| 10 |
+
import time
|
| 11 |
|
| 12 |
def load_model_from_config(config_path, model_name, device='cuda'):
|
| 13 |
# Load the config file
|
|
|
|
| 40 |
c = model.get_learned_conditioning(c_dict)
|
| 41 |
c = model.enc_concat_seq(c, c_dict, 'c_concat')
|
| 42 |
|
| 43 |
+
print ('sleeping')
|
| 44 |
+
time.sleep(120)
|
| 45 |
+
print ('finished sleeping')
|
| 46 |
samples_ddim = model.p_sample_loop(cond=c, shape=[1, 3, 64, 64], return_intermediates=False, verbose=True)
|
| 47 |
#samples_ddim, _ = sampler.sample(S=999,
|
| 48 |
# conditioning=c,
|