Skip to content

Commit

Permalink
Apply thread limit to intra_op_num_threads (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lajcisvk authored Oct 20, 2023
1 parent 0d0f6c6 commit 9eb3da1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rembg/session_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ def new_session(

if "OMP_NUM_THREADS" in os.environ:
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)

0 comments on commit 9eb3da1

Please sign in to comment.