diff --git a/cluster4npu_ui/core/functions/Multidongle.py b/cluster4npu_ui/core/functions/Multidongle.py index e165806..0928dfe 100644 --- a/cluster4npu_ui/core/functions/Multidongle.py +++ b/cluster4npu_ui/core/functions/Multidongle.py @@ -286,11 +286,9 @@ class MultiDongle: self.upload_fw = upload_fw - # Check if the firmware is needed - if self.upload_fw: - self.scpu_fw_path = scpu_fw_path - self.ncpu_fw_path = ncpu_fw_path - + # Always store firmware paths when provided + self.scpu_fw_path = scpu_fw_path + self.ncpu_fw_path = ncpu_fw_path self.model_path = model_path self.device_group = None @@ -332,16 +330,16 @@ class MultiDongle: # kp.core.set_timeout(device_group=self.device_group, milliseconds=5000) # print(' - Success') - # if self.upload_fw: - try: - print('[Upload Firmware]') - kp.core.load_firmware_from_file(device_group=self.device_group, - scpu_fw_path=self.scpu_fw_path, - ncpu_fw_path=self.ncpu_fw_path) - print(' - Success') - except kp.ApiKPException as exception: - print('Error: upload firmware failed, error = \'{}\''.format(str(exception))) - sys.exit(1) + if self.upload_fw: + try: + print('[Upload Firmware]') + kp.core.load_firmware_from_file(device_group=self.device_group, + scpu_fw_path=self.scpu_fw_path, + ncpu_fw_path=self.ncpu_fw_path) + print(' - Success') + except kp.ApiKPException as exception: + print('Error: upload firmware failed, error = \'{}\''.format(str(exception))) + sys.exit(1) # upload model to device try: