Skip to content

Commit

Permalink
fix: show output params based on config
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Oct 22, 2022
1 parent 6f13258 commit 58995d4
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,25 @@ export function apply(ctx: Context, config: Config) {
nickname: session.author?.nickname || session.username,
}
const result = segment('figure')
const params = [`seed = ${seed}`]
const lines = [`seed = ${seed}`]
if (config.output === 'verbose') {
params.push(
`model = ${options.model}`,
if (!thirdParty()) {
lines.push(`model = ${model}`)
}
lines.push(
`sampler = ${options.sampler}`,
`steps = ${options.steps}`,
`scale = ${options.scale}`,
`steps = ${parameters.steps}`,
`scale = ${parameters.scale}`,
)
if (parameters.image) {
lines.push(
`strength = ${parameters.strength}`,
`noise = ${parameters.noise}`,
)
}
}
result.children.push(segment('message', attrs, params.join('\n')))
result.children.push(segment('message', attrs, `prompt = ${input}`))
result.children.push(segment('message', attrs, lines.join('\n')))
result.children.push(segment('message', attrs, `prompt = ${prompt}`))
if (config.output === 'verbose') {
result.children.push(segment('message', attrs, `undesired = ${uc}`))
}
Expand Down

0 comments on commit 58995d4

Please sign in to comment.