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 src/liveportrait/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def _apply(self, fn):

target_device = target_tensor.device
target_dtype = target_tensor.dtype
except:
except Exception:
target_device = param.device
target_dtype = param.dtype

Expand Down
4 changes: 2 additions & 2 deletions src/modeling/engine_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def get_safe_shape(engine, name):
trt.volume(self.output_shapes[name]), dtype=trt.nptype(self.output_dtypes[name])
) for name in self.output_names
} # 分配 page-locked host 内存以存储输出
except:
except Exception:
self.ctx.pop()
raise Exception("CUDA Initialization Failed!")
self.ctx.pop()
Expand Down Expand Up @@ -296,7 +296,7 @@ def unlink(self):
try:
for name in self.input_names:
self.context.set_tensor_address(name, int(self.dinputs[name]))
except:
except Exception:
self.ctx.pop()
if not(self.extra_lock is None):
self.extra_lock.release()
Expand Down
2 changes: 1 addition & 1 deletion src/models/unet_2d_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def from_unet(
try:
# print('Successfully initializing ControlNet!', name, tensor.shape, src_tensors[name].shape)
tensor.copy_(src_tensors[name].detach())
except:
except Exception:
# print('Mismatch occured in initializing ControlNet!', name, tensor.shape, src_tensors[name].shape)
# TODO: 确保所有upblock参数有初始化
if tensor.dim() == 1:
Expand Down
2 changes: 1 addition & 1 deletion src/utils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def create_code_snapshot(root, dst_path, extensions=(".py", ".h", ".cpp", ".cu",
try:
tar.add(path.as_posix(), arcname=path.relative_to(
root).as_posix(), recursive=True)
except:
except Exception:
print(path)
assert False, 'Error occur in create_code_snapshot'

Expand Down