iuliaturc / detextify

Remove text from AI-generated images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

erro when executing demo. TypeError: __init__() got an unexpected keyword argument 'method_whitelist'

nissansz opened this issue · comments

from detextify.text_detector import TesseractTextDetector
from detextify.inpainter import LocalSDInpainter
from detextify.detextifier import Detextifier

text_detector = TesseractTextDetector("/path/to/tesseract/installation")
detextifier = Detextifier(text_detector, LocalSDInpainter())
detextifier.detextify("/my/input/image/path.png", "/my/output/image/path.png")


line 2, in
from detextify.inpainter import LocalSDInpainter
File "D:\Python3.8.8\lib\site-packages\detextify\inpainter.py", line 5, in
import replicate
File "D:\Python3.8.8\lib\site-packages\replicate_init_.py", line 4, in
default_client = Client()
File "D:\Python3.8.8\lib\site-packages\replicate\client.py", line 31, in init
retries = Retry(
TypeError: init() got an unexpected keyword argument 'method_whitelist'

replicate update broke their API, to fix this error, run:

pip install replicate==0.22.0

To go back to a compatible version.
You may need to set the version for other libraries as well (windows):

pip install accelerate==0.26.1
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117 

However, even after fixing this error the library doesn't seem to work. It detects 0 text and no output is generated.

I can use paddleocr to get get boxes, how to use it together with detextify?