replicate / replicate-python

Python client for Replicate
https://replicate.com
Apache License 2.0
696 stars 194 forks source link

Can you upload local files to create training with sdxl? #297

Closed Vadimkomis closed 2 months ago

Vadimkomis commented 2 months ago

I know that you can reference 'input_images` for public URL, but I wanted to see if it's possible to upload a list of images that are zipped to create training? When I tried it, I kept getting the following errors:

Prediction input failed validation: {"detail":[{"loc":["body","input","input_images"],"msg":"'' is not a valid URL scheme. 'data', 'http', or 'https' is supported.","type":"value_error"}]}

Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/cog/server/worker.py", line 217, in _predict result = predict(**payload) File "train.py", line 142, in train input_dir = preprocess( File "/src/preprocess.py", line 111, in preprocess assert False, "input_images_filetype must be zip or tar" AssertionError: input_images_filetype must be zip or tar

Prediction input failed validation: {"detail":[{"loc":["body","input","input_images"],"msg":"'file' is not a valid URL scheme. 'data', 'http', or 'https' is supported.","type":"value_error"}]}

Vadimkomis commented 2 months ago

I realized that you can, so I'm closing this issue.