geekyutao / Inpaint-Anything

Inpaint anything using Segment Anything and inpainting models.
Apache License 2.0
6.4k stars 525 forks source link

UserWarning: Overwriting tiny_vit_5m_224 in registry & libiomp5md.dll already initialized #129

Open Troyanovsky opened 8 months ago

Troyanovsky commented 8 months ago

i'm getting the following error:

segment_anything\segment_anything\modeling\tiny_vit_sam.py:657: UserWarning: Overwriting tiny_vit_5m_224 in registry with segment_anything.modeling.tiny_vit_sam.tiny_vit_5m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
  return register_model(fn_wrapper)

when trying to run remove_anything or fill_anything.py.

in addition, I'm getting the following error for fill_anything.py:

OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.

the command i used was:

python fill_anything.py --input_img ./example/fill-anything/sample1.png --coords_type key_in --point_coords 750 500 --point_labels 1 --text_prompt "a teddy bear on a bench" --dilate_kernel_size 50 --output_dir ./results --sam_model_type "vit_h" --sam_ckpt ./pretrained_models/sam_vit_h_4b8939.pth