jbilcke-hf HF staff commited on
Commit
0b0c65d
β€’
1 Parent(s): 1cebed6

fix for Replicate

Browse files
src/app/engine/render.ts CHANGED
@@ -14,7 +14,7 @@ const serverHuggingfaceApiKey = `${process.env.AUTH_HF_API_TOKEN || ""}`
14
  const serverHuggingfaceApiUrl = `${process.env.RENDERING_HF_INFERENCE_ENDPOINT_URL || ""}`
15
  const serverHuggingfaceInferenceApiModel = `${process.env.RENDERING_HF_INFERENCE_API_BASE_MODEL || ""}`
16
  const serverHuggingfaceInferenceApiModelRefinerModel = `${process.env.RENDERING_HF_INFERENCE_API_REFINER_MODEL || ""}`
17
- const serverHuggingfaceInferenceApiModelTrigger = `${process.env.RENDERING_HF_INFERENCE_API_MODEL_TRIGGER || "style of TOK"}`
18
 
19
  const serverReplicateApiKey = `${process.env.AUTH_REPLICATE_API_TOKEN || ""}`
20
  const serverReplicateApiModel = `${process.env.RENDERING_REPLICATE_API_MODEL || ""}`
@@ -206,7 +206,10 @@ export async function newRender({
206
  ].filter(x => x).join(", "),
207
  width,
208
  height,
209
- seed
 
 
 
210
  }
211
  })
212
 
 
14
  const serverHuggingfaceApiUrl = `${process.env.RENDERING_HF_INFERENCE_ENDPOINT_URL || ""}`
15
  const serverHuggingfaceInferenceApiModel = `${process.env.RENDERING_HF_INFERENCE_API_BASE_MODEL || ""}`
16
  const serverHuggingfaceInferenceApiModelRefinerModel = `${process.env.RENDERING_HF_INFERENCE_API_REFINER_MODEL || ""}`
17
+ const serverHuggingfaceInferenceApiModelTrigger = `${process.env.RENDERING_HF_INFERENCE_API_MODEL_TRIGGER || ""}`
18
 
19
  const serverReplicateApiKey = `${process.env.AUTH_REPLICATE_API_TOKEN || ""}`
20
  const serverReplicateApiModel = `${process.env.RENDERING_REPLICATE_API_MODEL || ""}`
 
206
  ].filter(x => x).join(", "),
207
  width,
208
  height,
209
+ seed,
210
+ ...replicateApiModelTrigger && {
211
+ lora_scale: 0.85 // we generally want something high here
212
+ },
213
  }
214
  })
215
 
src/app/interface/settings-dialog/defaultSettings.ts CHANGED
@@ -8,7 +8,7 @@ export const defaultSettings: Settings = {
8
  replicateApiKey: "",
9
  replicateApiModel: "stabilityai/sdxl",
10
  replicateApiModelVersion: "da77bc59ee60423279fd632efb4795ab731d9e3ca9705ef3341091fb989b7eaf",
11
- replicateApiModelTrigger: "style of TOK",
12
  openaiApiKey: "",
13
  openaiApiModel: "dall-e-3",
14
  }
 
8
  replicateApiKey: "",
9
  replicateApiModel: "stabilityai/sdxl",
10
  replicateApiModelVersion: "da77bc59ee60423279fd632efb4795ab731d9e3ca9705ef3341091fb989b7eaf",
11
+ replicateApiModelTrigger: "",
12
  openaiApiKey: "",
13
  openaiApiModel: "dall-e-3",
14
  }
src/app/interface/settings-dialog/index.tsx CHANGED
@@ -211,7 +211,7 @@ export function SettingsDialog() {
211
  <Label>LoRA model trigger (optional):</Label>
212
  <Input
213
  className="font-mono"
214
- placeholder={'LoRA trigger keyword eg. "style of TOK"'}
215
  onChange={(x) => {
216
  setReplicateApiModelTrigger(x.target.value)
217
  }}
 
211
  <Label>LoRA model trigger (optional):</Label>
212
  <Input
213
  className="font-mono"
214
+ placeholder="In the style of TOK"
215
  onChange={(x) => {
216
  setReplicateApiModelTrigger(x.target.value)
217
  }}