rphrp1985 commited on
Commit
e7fdf34
1 Parent(s): 5ac4bb3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -15,7 +15,7 @@ is_canonical = True if os.environ.get("SPACE_ID") == "Pyramid-Flow/pyramid-flow"
15
  # Constants
16
  MODEL_PATH = "pyramid-flow-model"
17
  MODEL_REPO = "rain1011/pyramid-flow-sd3"
18
- MODEL_VARIANT = "diffusion_transformer_384p"
19
  MODEL_DTYPE = "bf16"
20
 
21
  def center_crop(image, target_width, target_height):
@@ -78,7 +78,7 @@ def generate_video(prompt, image=None, duration=10, guidance_scale=9, video_guid
78
  guidance_scale=7.0,
79
  video_guidance_scale=video_guidance_scale,
80
  output_type="pil",
81
- save_memory=True,
82
  )
83
  else:
84
  with torch.no_grad(), torch.cuda.amp.autocast(enabled=True, dtype=torch_dtype):
@@ -86,13 +86,13 @@ def generate_video(prompt, image=None, duration=10, guidance_scale=9, video_guid
86
  prompt=prompt,
87
  num_inference_steps=[20, 20, 20],
88
  video_num_inference_steps=[10, 10, 10],
89
- height=320,
90
- width=480,
91
  temp=temp,
92
  guidance_scale=guidance_scale,
93
  video_guidance_scale=video_guidance_scale,
94
  output_type="pil",
95
- save_memory=True,
96
  )
97
  output_path = f"{str(uuid.uuid4())}_output_video.mp4"
98
  export_to_video(frames, output_path, fps= 8)
 
15
  # Constants
16
  MODEL_PATH = "pyramid-flow-model"
17
  MODEL_REPO = "rain1011/pyramid-flow-sd3"
18
+ MODEL_VARIANT = "diffusion_transformer_768p"
19
  MODEL_DTYPE = "bf16"
20
 
21
  def center_crop(image, target_width, target_height):
 
78
  guidance_scale=7.0,
79
  video_guidance_scale=video_guidance_scale,
80
  output_type="pil",
81
+ # save_memory=True,
82
  )
83
  else:
84
  with torch.no_grad(), torch.cuda.amp.autocast(enabled=True, dtype=torch_dtype):
 
86
  prompt=prompt,
87
  num_inference_steps=[20, 20, 20],
88
  video_num_inference_steps=[10, 10, 10],
89
+ height=768,
90
+ width=1280,
91
  temp=temp,
92
  guidance_scale=guidance_scale,
93
  video_guidance_scale=video_guidance_scale,
94
  output_type="pil",
95
+ # save_memory=True,
96
  )
97
  output_path = f"{str(uuid.uuid4())}_output_video.mp4"
98
  export_to_video(frames, output_path, fps= 8)