Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/quadmask_cogvideox.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_video_model_config():
config.num_inference_steps = 50
config.lora_weight = 0.55
config.temporal_window_size = 85
config.temproal_multidiffusion_stride = 16
config.temporal_multidiffusion_stride = 16
config.use_vae_mask = True
config.stack_mask = False
return config
Expand Down
6 changes: 1 addition & 5 deletions data_generation/convert_all_scenarios_for_characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ def run_blender_script(script_path, args):
# Check if blender command exists, if not use python directly with bpy
if subprocess.run(["which", "blender"], capture_output=True).returncode != 0:
# Use python with bpy import instead
cmd = ["python", "-c", f"""
import sys
sys.argv = {['script'] + args}
exec(open('{script_path}').read())
"""]
cmd = ["python", script_path] + args

result = subprocess.run(cmd, capture_output=True, text=True)
return result.returncode == 0, result.stdout, result.stderr
Expand Down
4 changes: 2 additions & 2 deletions data_generation/kubric_variable_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def cleanup_scene():
"""Clean up Blender and PyBullet to prevent memory leaks"""
try:
pb.disconnect()
except:
except Exception:
pass
gc.collect()
try:
bpy.ops.wm.read_factory_settings(use_empty=True)
except:
except Exception:
pass

def apply_camera_motion(camera, motion_type, cam_distance, cam_angle, cam_height,
Expand Down
2 changes: 1 addition & 1 deletion data_generation/render_paired_videos_blender_quadmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ def process_sequence(sequence_path, output_dir, args):
if not attr.startswith('_') and attr not in ['location', 'width', 'height']:
try:
setattr(new_node, attr, getattr(node, attr))
except:
except (AttributeError, TypeError):
pass

scene.view_settings.view_transform = orig_view_transform
Expand Down
2 changes: 1 addition & 1 deletion scripts/cogvideox_fun/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except ImportError:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/cogvideox_fun/train_warped_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ def load_model_hook(models, input_dir):
elif args.use_came:
try:
from came_pytorch import CAME
except:
except ImportError:
raise ImportError(
"Please install came_pytorch to use CAME. You can do so by running `pip install came_pytorch`"
)
Expand Down
4 changes: 2 additions & 2 deletions videox_fun/api/api_multi_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

try:
import ray
except:
except ImportError:
print("Ray is not installed. If you want to use multi gpus api. Please install it by running 'pip install ray'.")
ray = None
ray = None

if ray is not None:
@ray.remote(num_gpus=1)
Expand Down