From b2644541834ddc711e0d2dcbddab9a6129409c47 Mon Sep 17 00:00:00 2001 From: emirhanbilgic Date: Mon, 26 Feb 2024 13:36:16 +0000 Subject: [PATCH] to deploy the model by pushing it to replicate --- .dockerignore | 1 - README.md | 16 ++++++++++++++++ script/{download_weights.py => download_weights} | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) rename script/{download_weights.py => download_weights} (98%) diff --git a/.dockerignore b/.dockerignore index 0b70e8a..d51ac1e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,3 @@ -sdxl-cache/ refiner-cache/ safety-cache/ trained-model/ diff --git a/README.md b/README.md index cbb757d..50e9d4c 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,22 @@ cog train -i input_images=@example_datasets/__data.zip -i use_face_detection_ins cog run -p 5000 python -m cog.server.http ``` +## Push to Replicate + +to push the trainable model to replicate, execute the following commands: + +```bash +chmod +x script/download_weights +``` + +```bash +cog run script/download_weights +``` + +```bash +cog push r8.im/"your model name in replicate here" +``` + ## Update notes **2023-08-17** diff --git a/script/download_weights.py b/script/download_weights similarity index 98% rename from script/download_weights.py rename to script/download_weights index b2e666f..fe1a030 100644 --- a/script/download_weights.py +++ b/script/download_weights @@ -1,3 +1,4 @@ +#!/usr/bin/env python # Run this before you deploy it on replicate, because if you don't # whenever you run the model, it will download the weights from the # internet, which will take a long time.