Julian Bilcke commited on
Commit ·
05b5081
1
Parent(s): d2fbbb1
hmm
Browse filesFiles changed (2)
35 unmodified lines3637383940414235 unmodified linesgit+https://github.com/LLaVA-VL/LLaVA-NeXT.git# for our frontendgradio==5.32.1gradio_togglegradio_modal35 unmodified lines3637383940414235 unmodified linesgit+https://github.com/LLaVA-VL/LLaVA-NeXT.git# for our frontendgradio==5.33.1gradio_togglegradio_modal
1495 unmodified lines1496149714981499150015011502150315041495 unmodified lineslora_weights_dir = self.app.output_path / "lora_weights"if lora_weights_dir.exists():logger.info(f"Found lora_weights directory: {lora_weights_dir}")lora_weights_contents = list(lora_weights_dir.glob("*"))logger.info(f"Contents of lora_weights directory: {lora_weights_contents}")lora_safetensors = lora_weights_dir / "pytorch_lora_weights.safetensors"if lora_safetensors.exists():logger.info(f"Found weights in lora_weights directory: {lora_safetensors}")1495 unmodified lines1496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401495 unmodified lineslora_weights_dir = self.app.output_path / "lora_weights"if lora_weights_dir.exists():logger.info(f"Found lora_weights directory: {lora_weights_dir}")# Look for the latest checkpoint directory in lora_weightslora_checkpoints = [d for d in lora_weights_dir.glob("*") if d.is_dir() and d.name.isdigit()]if lora_checkpoints:latest_lora_checkpoint = max(lora_checkpoints, key=lambda x: int(x.name))logger.info(f"Found latest LoRA checkpoint: {latest_lora_checkpoint}")# List contents of the latest checkpoint directorycheckpoint_contents = list(latest_lora_checkpoint.glob("*"))logger.info(f"Contents of LoRA checkpoint {latest_lora_checkpoint.name}: {checkpoint_contents}")# Check for weights in the latest LoRA checkpointlora_safetensors = latest_lora_checkpoint / "pytorch_lora_weights.safetensors"if lora_safetensors.exists():logger.info(f"Found weights in latest LoRA checkpoint: {lora_safetensors}")return str(lora_safetensors)# Also check for other common weight file namespossible_weight_files = ["pytorch_lora_weights.safetensors","adapter_model.safetensors","pytorch_model.safetensors","model.safetensors"]for weight_file in possible_weight_files:weight_path = latest_lora_checkpoint / weight_fileif weight_path.exists():logger.info(f"Found weights file {weight_file} in latest LoRA checkpoint: {weight_path}")return str(weight_path)# Check if any .safetensors files existsafetensors_files = list(latest_lora_checkpoint.glob("*.safetensors"))if safetensors_files:logger.info(f"Found .safetensors files in LoRA checkpoint: {safetensors_files}")# Return the first .safetensors file foundreturn str(safetensors_files[0])# Fallback: check for direct safetensors file in lora_weights rootlora_safetensors = lora_weights_dir / "pytorch_lora_weights.safetensors"if lora_safetensors.exists():logger.info(f"Found weights in lora_weights directory: {lora_safetensors}")
degraded_requirements.txt+1-1
vms/ui/project/services/training.py+38-2