app_cli got error
CLI:
python app_cli.py --input_image dog.png --text dog --output_image dog_remove.png
Error:
Traceback (most recent call last):
File "/home/ec2-user/SageMaker/segtest/Grounded-Segment-Anything_old/app_cli.py", line 108, in
output_images, _ = run_anything_task(input_image = input_image,
File "/home/ec2-user/SageMaker/segtest/Grounded-Segment-Anything_old/app.py", line 666, in run_anything_task
boxes_filt, pred_phrases = get_grounding_output(
File "/home/ec2-user/SageMaker/segtest/Grounded-Segment-Anything_old/app.py", line 216, in get_grounding_output
model = model.to(device)
AttributeError: 'NoneType' object has no attribute 'to'
Btw, the web interface works. (app.py)
My goal is to wrap the segment task into a CLI python app.
May I know how to fix this error? Thx.
I have fixed it.