replicate / lora-training

LoRA training model packaged with Cog
MIT License
111 stars 29 forks source link

better filenames for output #3

Closed anotherjesse closed 1 year ago

anotherjesse commented 1 year ago

Currently the output filename ends up looking like: steps_1000.safetensors

And the URL from replicate ends up looking like:

https://replicate.delivery/pbxt/OqF4uUCflTTZVqTec9UiMmjWxl0YzgVzGnbbCPVwdkFZbjZQA/step_1000.safetensors

One suggestion from @andreasjansson is to use the filename from the instance_data zip as the filename.

https://replicate.delivery/pbxt/OqF4uUCflTTZVqTec9UiMmjWxl0YzgVzGnbbCPVwdkFZbjZQA/my_name.safetensors
andreasjansson commented 1 year ago

I implemented that here: https://github.com/replicate/lora-training/blob/d93a7613dc2f2c2224ada0efc5e04d06d2e23db1/predict_basic.py#L112-L113