Made image gen WAY faster
This commit is contained in:
parent
f8e6257fd9
commit
5be1165858
1 changed files with 8 additions and 3 deletions
|
@ -113,9 +113,14 @@ func ReplicateImageGeneration(prompt string, filename string) (*bytes.Buffer, er
|
|||
}
|
||||
|
||||
input := replicate.PredictionInput{
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"prompt": prompt,
|
||||
"refiner": "expert_ensemble_refiner",
|
||||
"num_inference_steps": 30,
|
||||
"scheduler": "K_EULER",
|
||||
"num_outputs": 1,
|
||||
"guidance_scale": 0,
|
||||
"negative_prompt": "worst quality, low quality",
|
||||
"num_inference_steps": 4,
|
||||
"disable_safety_checker": true,
|
||||
}
|
||||
webhook := replicate.Webhook{
|
||||
|
@ -123,7 +128,7 @@ func ReplicateImageGeneration(prompt string, filename string) (*bytes.Buffer, er
|
|||
Events: []replicate.WebhookEventType{"start", "completed"},
|
||||
}
|
||||
|
||||
prediction, predictionError := client.Run(context.Background(), "stability-ai/sdxl:39ed52f2a78e934b3ba6e2a89f5b1c712de7dfea535525255b1aa35c5565e08b", input, &webhook)
|
||||
prediction, predictionError := client.Run(context.Background(), "lucataco/sdxl-lightning-4step:727e49a643e999d602a896c774a0658ffefea21465756a6ce24b7ea4165eba6a", input, &webhook)
|
||||
|
||||
if predictionError != nil {
|
||||
return nil, predictionError
|
||||
|
|
Loading…
Add table
Reference in a new issue