Description
I am trying to create a Flux lora using https://replicate.com/ostris/flux-dev-lora-trainer/train
.
However it is not accepting the zip file I provide, stating that it's not a zip file. To make sure it's a zip file (even though I know it) I also checked this on my end by using zipfile
library.
Model created: tobias-varden/test-fifth-lora
<_io.BufferedReader name='C:\temp\dreambooth\dreambooth.zip'>
Training started: starting
Training URL: https://replicate.com/p/xxxxxxxxxxxxxxxxx
Training status: failed
Training failed or was canceled. Status: failed
Training logs: Traceback (most recent call last):
File "/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/cog/server/worker.py", line 354, in _predict
result = predict(**payload)
File "/src/train.py", line 127, in train
extract_zip(input_images, INPUT_DIR)
File "/src/train.py", line 287, in extract_zip
raise ValueError("input_images must be a zip file")
ValueError: input_images must be a zip file
Currently using replicate==0.31.0
version.
I am on Windows 11.
The code:
with open(image_path, "rb") as f:
print(f)
training = replicate.trainings.create(
version="ostris/flux-dev-lora-trainer:4ffd32160efd92e956d39c5338a9b8fbafca58e03f791f6d8011f3e20e8ea6fa",
input={
"input_images": f,
"steps": 1000,
"prefix": f"A photo of {token}, "
},
destination=f"{model.owner}/{model.name}"
)