Last active
May 9, 2024 16:53
-
-
Save fofr/9e5ed093871f091e5c3b3268038d8195 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Replicate from 'replicate' | |
import * as dotenv from 'dotenv' | |
dotenv.config() | |
const replicate = new Replicate({ | |
auth: process.env.REPLICATE_API_TOKEN, | |
}) | |
async function main() { | |
const training = await replicate.trainings.create( | |
'stability-ai', | |
'sdxl', | |
'a00d0b7dcbb9c3fbb34ba87d2d5b46c56969c84a628bf778a7fdaec30b1b99c5', | |
{ | |
destination: 'your-username/your-model', | |
input: { | |
input_images: 'https://example.com/your-images.zip' | |
} | |
}) | |
console.log(`URL: https://replicate.com/p/${training.id}`) | |
} | |
main() | |
// Run: | |
// node train-sdxl.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment