Skip to content

Commit

Permalink
#58 - minor corrections to last commit
Browse files Browse the repository at this point in the history
Signed-off-by: julianbollig <[email protected]>
  • Loading branch information
julianbollig committed Feb 6, 2025
1 parent 89bd882 commit 4e51475
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions WebUI/src/assets/js/store/stableDiffusion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ type BackendParams = {

type ImageInfoParams = {
size: string
model_name: string
} & Partial<BackendParams>
} & BackendParams

export const useStableDiffusion = defineStore(
'stableDiffusion',
Expand Down Expand Up @@ -59,7 +58,10 @@ export const useStableDiffusion = defineStore(
generate_number: imageGeneration.batchSize,
inference_steps: imageGeneration.inferenceSteps,
guidance_scale: imageGeneration.guidanceScale,
seed: imageGeneration.seed === -1 ? Math.random() * 1000000 : imageGeneration.seed,
seed:
imageGeneration.seed === -1
? Math.floor(Math.random() * 1000000)
: imageGeneration.seed,
height: imageGeneration.height,
width: imageGeneration.width,
lora: imageGeneration.lora,
Expand Down Expand Up @@ -133,7 +135,6 @@ export const useStableDiffusion = defineStore(
createInfoParamTable({
...defaultBackendParams.value,
size: String(data.params.size),
model_name: String(data.params.model_name),
})
await imageGeneration.updateImage(data.index, data.image, false, infoParams)
break
Expand Down Expand Up @@ -216,7 +217,7 @@ export const useStableDiffusion = defineStore(
size: infoParams.size,
Device: infoParams.device,
prompt: infoParams.prompt,
model_name: infoParams.model_name,
model_name: infoParams.model_repo_id,
mode: mapModeToText(infoParams.mode),
negative_prompt: infoParams.negative_prompt,
inference_steps: infoParams.inference_steps,
Expand Down

0 comments on commit 4e51475

Please sign in to comment.