QinOwen
commited on
Commit
•
f80aade
1
Parent(s):
1759457
test
Browse files
VADER-VideoCrafter/lvdm/models/samplers/ddim.py
CHANGED
@@ -153,12 +153,12 @@ class DDIMSampler(object):
|
|
153 |
else:
|
154 |
img = x_T
|
155 |
|
156 |
-
print("x_T: ", x_T)
|
157 |
-
print("shape: ", shape)
|
158 |
-
print('random seed debug: ', torch.randn(100, device=device).sum())
|
159 |
-
print("Debug initial noise: ", torch.randn(shape, device=device).sum().item())
|
160 |
-
print("Debug initial noise: ", torch.randn(shape, device=device).sum().item())
|
161 |
-
print("noise device: ", img.device)
|
162 |
|
163 |
if timesteps is None:
|
164 |
timesteps = self.ddpm_num_timesteps if ddim_use_original_steps else self.ddim_timesteps
|
|
|
153 |
else:
|
154 |
img = x_T
|
155 |
|
156 |
+
# print("x_T: ", x_T)
|
157 |
+
# print("shape: ", shape)
|
158 |
+
# print('random seed debug: ', torch.randn(100, device=device).sum())
|
159 |
+
# print("Debug initial noise: ", torch.randn(shape, device=device).sum().item())
|
160 |
+
# print("Debug initial noise: ", torch.randn(shape, device=device).sum().item())
|
161 |
+
# print("noise device: ", img.device)
|
162 |
|
163 |
if timesteps is None:
|
164 |
timesteps = self.ddpm_num_timesteps if ddim_use_original_steps else self.ddim_timesteps
|
VADER-VideoCrafter/scripts/main/train_t2v_lora.py
CHANGED
@@ -589,9 +589,9 @@ def run_training(args, model, **kwargs):
|
|
589 |
# load the pretrained LoRA model
|
590 |
peft.set_peft_model_state_dict(peft_model, torch.load(args.lora_ckpt_path))
|
591 |
|
592 |
-
print('random seed debug: ', torch.randn(100, device=accelerator.device).sum())
|
593 |
print("precision: ", peft_model.dtype)
|
594 |
-
# precision of first_stage_model
|
595 |
print("precision of first_stage_model: ", peft_model.first_stage_model.dtype)
|
596 |
print("peft_model device: ", peft_model.device)
|
597 |
|
@@ -651,8 +651,7 @@ def run_training(args, model, **kwargs):
|
|
651 |
raise NotImplementedError
|
652 |
|
653 |
# Inference Step 3.2: inference, batch_samples shape: batch, <samples>, c, t, h, w
|
654 |
-
# no backprop_mode=args.backprop_mode because it is inference process
|
655 |
-
seed_everything_self(args.seed)
|
656 |
if isinstance(peft_model, torch.nn.parallel.DistributedDataParallel):
|
657 |
batch_samples = batch_ddim_sampling(peft_model.module, cond, noise_shape, args.n_samples, \
|
658 |
args.ddim_steps, args.ddim_eta, args.unconditional_guidance_scale, None, decode_frame=args.decode_frame, **kwargs)
|
|
|
589 |
# load the pretrained LoRA model
|
590 |
peft.set_peft_model_state_dict(peft_model, torch.load(args.lora_ckpt_path))
|
591 |
|
592 |
+
# print('random seed debug: ', torch.randn(100, device=accelerator.device).sum())
|
593 |
print("precision: ", peft_model.dtype)
|
594 |
+
# # precision of first_stage_model
|
595 |
print("precision of first_stage_model: ", peft_model.first_stage_model.dtype)
|
596 |
print("peft_model device: ", peft_model.device)
|
597 |
|
|
|
651 |
raise NotImplementedError
|
652 |
|
653 |
# Inference Step 3.2: inference, batch_samples shape: batch, <samples>, c, t, h, w
|
654 |
+
# no backprop_mode=args.backprop_mode because it is inference process
|
|
|
655 |
if isinstance(peft_model, torch.nn.parallel.DistributedDataParallel):
|
656 |
batch_samples = batch_ddim_sampling(peft_model.module, cond, noise_shape, args.n_samples, \
|
657 |
args.ddim_steps, args.ddim_eta, args.unconditional_guidance_scale, None, decode_frame=args.decode_frame, **kwargs)
|
app.py
CHANGED
@@ -12,12 +12,13 @@ from train_t2v_lora import main_fn, setup_model
|
|
12 |
|
13 |
examples = [
|
14 |
["A fairy tends to enchanted, glowing flowers.", 'huggingface-hps-aesthetic', 8, 400, 384, 512, 12.0, 25, 1.0, 24, 10],
|
15 |
-
["A cat playing an electric guitar in a loft with industrial-style decor and soft, multicolored lights.", 'huggingface-hps-aesthetic', 8,
|
16 |
["A raccoon playing a guitar under a blossoming cherry tree.", 'huggingface-hps-aesthetic', 8, 204, 384, 512, 12.0, 25, 1.0, 24, 10],
|
|
|
17 |
["A mermaid with flowing hair and a shimmering tail discovers a hidden underwater kingdom adorned with coral palaces, glowing pearls, and schools of colorful fish, encountering both wonders and dangers along the way.",
|
18 |
"huggingface-pickscore", 16, 205, 384, 512, 12.0, 25, 1.0, 24, 10],
|
19 |
["A talking bird with shimmering feathers and a melodious voice leads an adventure to find a legendary treasure, guiding through enchanted forests, ancient ruins, and mystical challenges.",
|
20 |
-
"huggingface-pickscore", 16,
|
21 |
]
|
22 |
|
23 |
model = setup_model()
|
|
|
12 |
|
13 |
examples = [
|
14 |
["A fairy tends to enchanted, glowing flowers.", 'huggingface-hps-aesthetic', 8, 400, 384, 512, 12.0, 25, 1.0, 24, 10],
|
15 |
+
["A cat playing an electric guitar in a loft with industrial-style decor and soft, multicolored lights.", 'huggingface-hps-aesthetic', 8, 208, 384, 512, 12.0, 25, 1.0, 24, 10],
|
16 |
["A raccoon playing a guitar under a blossoming cherry tree.", 'huggingface-hps-aesthetic', 8, 204, 384, 512, 12.0, 25, 1.0, 24, 10],
|
17 |
+
["A raccoon playing an electric bass in a garage band setting.", 'huggingface-hps-aesthetic', 8, 400, 384, 512, 12.0, 25, 1.0, 24, 10],
|
18 |
["A mermaid with flowing hair and a shimmering tail discovers a hidden underwater kingdom adorned with coral palaces, glowing pearls, and schools of colorful fish, encountering both wonders and dangers along the way.",
|
19 |
"huggingface-pickscore", 16, 205, 384, 512, 12.0, 25, 1.0, 24, 10],
|
20 |
["A talking bird with shimmering feathers and a melodious voice leads an adventure to find a legendary treasure, guiding through enchanted forests, ancient ruins, and mystical challenges.",
|
21 |
+
"huggingface-pickscore", 16, 600, 384, 512, 12.0, 25, 1.0, 24, 10]
|
22 |
]
|
23 |
|
24 |
model = setup_model()
|