Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
delete negative prompt if base model is flux
Browse files
src/routes/api/generate/+server.ts
CHANGED
@@ -33,9 +33,14 @@ export async function POST({ request, cookies } : RequestEvent) {
|
|
33 |
},
|
34 |
select: {
|
35 |
instance_prompt: true,
|
|
|
36 |
}
|
37 |
})
|
38 |
|
|
|
|
|
|
|
|
|
39 |
const response = await fetch(process.env.SECRET_INFERENCE_API_URL + "/models/" + generation?.model?.id, {
|
40 |
method: "POST",
|
41 |
headers: {
|
|
|
33 |
},
|
34 |
select: {
|
35 |
instance_prompt: true,
|
36 |
+
base_model: true,
|
37 |
}
|
38 |
})
|
39 |
|
40 |
+
if (model?.base_model === "black-forest-labs/FLUX.1-dev") {
|
41 |
+
delete generation.negative_prompt
|
42 |
+
}
|
43 |
+
|
44 |
const response = await fetch(process.env.SECRET_INFERENCE_API_URL + "/models/" + generation?.model?.id, {
|
45 |
method: "POST",
|
46 |
headers: {
|