camenduru commited on
Commit
c3d1a06
·
verified ·
1 Parent(s): 8738c59

Update worker_runpod.py

Browse files
Files changed (1) hide show
  1. worker_runpod.py +20 -10
worker_runpod.py CHANGED
@@ -10,7 +10,17 @@ def generate(input):
10
  values = input["input"]
11
 
12
  positive_prompt = values['positive_prompt']
 
 
 
13
  seed = values['seed']
 
 
 
 
 
 
 
14
 
15
  if seed == 0:
16
  random.seed(int(time.time()))
@@ -22,17 +32,17 @@ def generate(input):
22
 
23
  outputs = hunyuan_video_sampler.predict(
24
  prompt=positive_prompt,
25
- height=args.video_size[0],
26
- width=args.video_size[1],
27
- video_length=args.video_length,
28
  seed=seed,
29
- negative_prompt=args.neg_prompt,
30
- infer_steps=args.infer_steps,
31
- guidance_scale=args.cfg_scale,
32
- num_videos_per_prompt=args.num_videos,
33
- flow_shift=args.flow_shift,
34
- batch_size=args.batch_size,
35
- embedded_guidance_scale=args.embedded_cfg_scale
36
  )
37
  samples = outputs['samples']
38
  sample = samples[0].unsqueeze(0)
 
10
  values = input["input"]
11
 
12
  positive_prompt = values['positive_prompt']
13
+ height = values['height']
14
+ width = values['width']
15
+ video_length = values['video_length']
16
  seed = values['seed']
17
+ negative_prompt = values['negative_prompt']
18
+ infer_steps = values['infer_steps']
19
+ guidance_scale = values['guidance_scale']
20
+ num_videos_per_prompt = values['num_videos_per_prompt']
21
+ flow_shift = values['flow_shift']
22
+ batch_size = values['batch_size']
23
+ embedded_guidance_scale = values['embedded_guidance_scale']
24
 
25
  if seed == 0:
26
  random.seed(int(time.time()))
 
32
 
33
  outputs = hunyuan_video_sampler.predict(
34
  prompt=positive_prompt,
35
+ height=height,
36
+ width=width,
37
+ video_length=video_length,
38
  seed=seed,
39
+ negative_prompt=negative_prompt,
40
+ infer_steps=infer_steps,
41
+ guidance_scale=guidance_scale,
42
+ num_videos_per_prompt=num_videos_per_prompt,
43
+ flow_shift=flow_shift,
44
+ batch_size=batch_size,
45
+ embedded_guidance_scale=embedded_guidance_scale
46
  )
47
  samples = outputs['samples']
48
  sample = samples[0].unsqueeze(0)