Julian Bilcke
commited on
Commit
·
cdb9a2e
1
Parent(s):
b1dfbd2
add more logs
Browse files
app.py
CHANGED
|
@@ -181,12 +181,15 @@ for file_path in text_encoder_files:
|
|
| 181 |
logger.info("All required model files are ready")
|
| 182 |
|
| 183 |
args = create_args()
|
|
|
|
| 184 |
hunyuan_video_sampler = HunyuanVideoSampler.from_pretrained(
|
| 185 |
args.ckpt,
|
| 186 |
args=args,
|
| 187 |
device=torch.device("cpu")
|
| 188 |
)
|
|
|
|
| 189 |
args = hunyuan_video_sampler.args
|
|
|
|
| 190 |
|
| 191 |
if args.cpu_offload:
|
| 192 |
from diffusers.hooks import apply_group_offloading
|
|
@@ -290,6 +293,9 @@ def generate_video(
|
|
| 290 |
progress(0.3 + (0.6 * idx / len(action_list)),
|
| 291 |
desc=f"Generating segment {idx+1}/{len(action_list)} (action: {action_id})")
|
| 292 |
|
|
|
|
|
|
|
|
|
|
| 293 |
outputs = hunyuan_video_sampler.predict(
|
| 294 |
prompt=prompt,
|
| 295 |
action_id=action_id,
|
|
|
|
| 181 |
logger.info("All required model files are ready")
|
| 182 |
|
| 183 |
args = create_args()
|
| 184 |
+
logger.info(f"Created args, val_disable_autocast: {hasattr(args, 'val_disable_autocast')} = {getattr(args, 'val_disable_autocast', 'NOT SET')}")
|
| 185 |
hunyuan_video_sampler = HunyuanVideoSampler.from_pretrained(
|
| 186 |
args.ckpt,
|
| 187 |
args=args,
|
| 188 |
device=torch.device("cpu")
|
| 189 |
)
|
| 190 |
+
logger.info(f"After from_pretrained, sampler.args has val_disable_autocast: {hasattr(hunyuan_video_sampler.args, 'val_disable_autocast')} = {getattr(hunyuan_video_sampler.args, 'val_disable_autocast', 'NOT SET')}")
|
| 191 |
args = hunyuan_video_sampler.args
|
| 192 |
+
logger.info(f"After reassigning args, val_disable_autocast: {hasattr(args, 'val_disable_autocast')} = {getattr(args, 'val_disable_autocast', 'NOT SET')}")
|
| 193 |
|
| 194 |
if args.cpu_offload:
|
| 195 |
from diffusers.hooks import apply_group_offloading
|
|
|
|
| 293 |
progress(0.3 + (0.6 * idx / len(action_list)),
|
| 294 |
desc=f"Generating segment {idx+1}/{len(action_list)} (action: {action_id})")
|
| 295 |
|
| 296 |
+
logger.info(f"Before predict call {idx}, args has val_disable_autocast: {hasattr(args, 'val_disable_autocast')} = {getattr(args, 'val_disable_autocast', 'NOT SET')}")
|
| 297 |
+
logger.info(f"hunyuan_video_sampler.args has val_disable_autocast: {hasattr(hunyuan_video_sampler.args, 'val_disable_autocast')} = {getattr(hunyuan_video_sampler.args, 'val_disable_autocast', 'NOT SET')}")
|
| 298 |
+
|
| 299 |
outputs = hunyuan_video_sampler.predict(
|
| 300 |
prompt=prompt,
|
| 301 |
action_id=action_id,
|
hymm_sp/diffusion/pipelines/pipeline_hunyuan_video_game.py
CHANGED
|
@@ -938,6 +938,10 @@ class HunyuanVideoGamePipeline(DiffusionPipeline):
|
|
| 938 |
)
|
| 939 |
|
| 940 |
target_dtype = PRECISION_TO_TYPE[self.args.precision]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 941 |
autocast_enabled = (target_dtype != torch.float32) and not self.args.val_disable_autocast
|
| 942 |
vae_dtype = PRECISION_TO_TYPE[self.args.vae_precision]
|
| 943 |
vae_autocast_enabled = (vae_dtype != torch.float32) and not self.args.val_disable_autocast
|
|
|
|
| 938 |
)
|
| 939 |
|
| 940 |
target_dtype = PRECISION_TO_TYPE[self.args.precision]
|
| 941 |
+
logger.info(f"Pipeline: self.args has val_disable_autocast: {hasattr(self.args, 'val_disable_autocast')}")
|
| 942 |
+
if not hasattr(self.args, 'val_disable_autocast'):
|
| 943 |
+
logger.warning(f"Pipeline: val_disable_autocast not found in args! Setting to False as default.")
|
| 944 |
+
self.args.val_disable_autocast = False
|
| 945 |
autocast_enabled = (target_dtype != torch.float32) and not self.args.val_disable_autocast
|
| 946 |
vae_dtype = PRECISION_TO_TYPE[self.args.vae_precision]
|
| 947 |
vae_autocast_enabled = (vae_dtype != torch.float32) and not self.args.val_disable_autocast
|