AkashKumarave commited on
Commit
06e8f08
·
verified ·
1 Parent(s): 9b003e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -45,7 +45,7 @@ def download_file(repo_id, filename, local_dir):
45
  local_files_only=False
46
  )
47
  logger.info(f"Downloaded to {downloaded_path}")
48
- return downloaded_path # Return the actual path from hf_hub_download
49
  except Exception as e:
50
  logger.error(f"Download failed: {e}")
51
  raise
@@ -85,10 +85,10 @@ except Exception as e:
85
  logger.error(f"Failed to load SDXL base model: {e}")
86
  raise
87
 
88
- # Load Kolors unet weights
89
  logger.info(f"Loading Kolors unet weights from {kolors_weights}...")
90
  try:
91
- state_dict = torch.load(kolors_weights, map_location=device)
92
  pipe.unet.load_state_dict(state_dict)
93
  logger.info("Kolors unet weights loaded successfully.")
94
  except Exception as e:
 
45
  local_files_only=False
46
  )
47
  logger.info(f"Downloaded to {downloaded_path}")
48
+ return downloaded_path
49
  except Exception as e:
50
  logger.error(f"Download failed: {e}")
51
  raise
 
85
  logger.error(f"Failed to load SDXL base model: {e}")
86
  raise
87
 
88
+ # Load Kolors unet weights with weights_only=False
89
  logger.info(f"Loading Kolors unet weights from {kolors_weights}...")
90
  try:
91
+ state_dict = torch.load(kolors_weights, map_location=device, weights_only=False)
92
  pipe.unet.load_state_dict(state_dict)
93
  logger.info("Kolors unet weights loaded successfully.")
94
  except Exception as e: