Commit
•
a8cc6af
1
Parent(s):
ab48d2d
fix for Replicate.com
Browse files- src/app/engine/render.ts +14 -1
src/app/engine/render.ts
CHANGED
@@ -66,7 +66,18 @@ export async function newRender({
|
|
66 |
const seed = generateSeed()
|
67 |
const prediction = await replicate.predictions.create({
|
68 |
version: replicateModelVersion,
|
69 |
-
input: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
})
|
71 |
|
72 |
// console.log("prediction:", prediction)
|
@@ -99,12 +110,14 @@ export async function newRender({
|
|
99 |
? huggingFaceInferenceEndpointUrl
|
100 |
: `https://api-inference.huggingface.co/models/${huggingFaceInferenceApiModel}`
|
101 |
|
|
|
102 |
console.log(`calling ${url} with params: `, {
|
103 |
num_inference_steps: 25,
|
104 |
guidance_scale: 8,
|
105 |
width,
|
106 |
height,
|
107 |
})
|
|
|
108 |
|
109 |
const res = await fetch(url, {
|
110 |
method: "POST",
|
|
|
66 |
const seed = generateSeed()
|
67 |
const prediction = await replicate.predictions.create({
|
68 |
version: replicateModelVersion,
|
69 |
+
input: {
|
70 |
+
prompt: [
|
71 |
+
"beautiful",
|
72 |
+
"intricate details",
|
73 |
+
prompt,
|
74 |
+
"award winning",
|
75 |
+
"high resolution"
|
76 |
+
].join(", "),
|
77 |
+
width,
|
78 |
+
height,
|
79 |
+
seed
|
80 |
+
}
|
81 |
})
|
82 |
|
83 |
// console.log("prediction:", prediction)
|
|
|
110 |
? huggingFaceInferenceEndpointUrl
|
111 |
: `https://api-inference.huggingface.co/models/${huggingFaceInferenceApiModel}`
|
112 |
|
113 |
+
/*
|
114 |
console.log(`calling ${url} with params: `, {
|
115 |
num_inference_steps: 25,
|
116 |
guidance_scale: 8,
|
117 |
width,
|
118 |
height,
|
119 |
})
|
120 |
+
*/
|
121 |
|
122 |
const res = await fetch(url, {
|
123 |
method: "POST",
|