enzostvs HF staff commited on
Commit
6121e67
β€’
1 Parent(s): d5438cc

delete negative prompt if base model is flux

Browse files
Files changed (1) hide show
  1. src/routes/api/generate/+server.ts +1 -1
src/routes/api/generate/+server.ts CHANGED
@@ -38,7 +38,7 @@ export async function POST({ request, cookies } : RequestEvent) {
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, {
 
38
  })
39
 
40
  if (model?.base_model === "black-forest-labs/FLUX.1-dev") {
41
+ delete generation.parameters.negative_prompt
42
  }
43
 
44
  const response = await fetch(process.env.SECRET_INFERENCE_API_URL + "/models/" + generation?.model?.id, {