mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-16 06:35:56 +08:00
Apply thread limit to intra_op_num_threads (#529)
This commit is contained in:
parent
0d0f6c66f4
commit
9eb3da12c2
@ -39,5 +39,6 @@ def new_session(
|
|||||||
|
|
||||||
if "OMP_NUM_THREADS" in os.environ:
|
if "OMP_NUM_THREADS" in os.environ:
|
||||||
sess_opts.inter_op_num_threads = int(os.environ["OMP_NUM_THREADS"])
|
sess_opts.inter_op_num_threads = int(os.environ["OMP_NUM_THREADS"])
|
||||||
|
sess_opts.intra_op_num_threads = int(os.environ["OMP_NUM_THREADS"])
|
||||||
|
|
||||||
return session_class(model_name, sess_opts, providers, *args, **kwargs)
|
return session_class(model_name, sess_opts, providers, *args, **kwargs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user