paulai commited on
Commit
05d5be9
1 Parent(s): 365a183

Update t2v_test.py

Browse files
Files changed (1) hide show
  1. t2v_test.py +3 -1
t2v_test.py CHANGED
@@ -44,12 +44,14 @@ class Text2Video():
44
  noise_shape = [batch_size, channels, frames, h, w]
45
 
46
  #prompts = batch_size * [""]
 
 
47
  text_emb = model.get_learned_conditioning([prompt])
48
 
49
  cond = {"c_crossattn": [text_emb], "fps": fps}
50
 
51
  ## inference
52
- batch_samples = batch_ddim_sampling(model, cond, noise_shape, n_samples=1, ddim_steps=steps, ddim_eta=eta, cfg_scale=cfg_scale)
53
  ## b,samples,c,t,h,w
54
  prompt_str = prompt.replace("/", "_slash_") if "/" in prompt else prompt
55
  prompt_str = prompt_str.replace(" ", "_") if " " in prompt else prompt_str
 
44
  noise_shape = [batch_size, channels, frames, h, w]
45
 
46
  #prompts = batch_size * [""]
47
+ prompt = prompt+", professional, 4k, highly detailed"
48
+ neg_prompts = "graphite, impressionist, noisy, blurry, soft, deformed, ugly"
49
  text_emb = model.get_learned_conditioning([prompt])
50
 
51
  cond = {"c_crossattn": [text_emb], "fps": fps}
52
 
53
  ## inference
54
+ batch_samples = batch_ddim_sampling(model, cond, noise_shape, n_samples=1, ddim_steps=steps, ddim_eta=eta, cfg_scale=cfg_scale, neg_prompts=neg_prompts)
55
  ## b,samples,c,t,h,w
56
  prompt_str = prompt.replace("/", "_slash_") if "/" in prompt else prompt
57
  prompt_str = prompt_str.replace(" ", "_") if " " in prompt else prompt_str