This commit is contained in:
Qing
2023-12-16 13:59:18 +08:00
parent 24e95daac1
commit 36b0782933
6 changed files with 55 additions and 49 deletions

View File

@@ -44,7 +44,12 @@ export default async function inpaint(
fd.append("sdSteps", settings.sdSteps.toString())
fd.append("sdGuidanceScale", settings.sdGuidanceScale.toString())
fd.append("sdSampler", settings.sdSampler.toString())
fd.append("sdSeed", settings.seed.toString())
if (settings.seedFixed) {
fd.append("sdSeed", settings.seed.toString())
} else {
fd.append("sdSeed", "-1")
}
fd.append("sdMatchHistograms", settings.sdMatchHistograms ? "true" : "false")
fd.append("sdScale", (settings.sdScale / 100).toString())
@@ -61,6 +66,7 @@ export default async function inpaint(
fd.append("p2pImageGuidanceScale", settings.p2pImageGuidanceScale.toString())
// ControlNet
fd.append("controlnet_enabled", settings.enableControlnet.toString())
fd.append(
"controlnet_conditioning_scale",
settings.controlnetConditioningScale.toString()

View File

@@ -247,6 +247,7 @@ const defaultValues: AppState = {
path: "lama",
model_type: "inpaint",
support_controlnet: false,
support_strength: false,
controlnets: [],
support_freeu: false,
support_lcm_lora: false,
@@ -410,24 +411,13 @@ export const useStore = createWithEqualityFn<AppState & AppAction>()(
}
const newRender = new Image()
await loadImage(newRender, blob)
if (useLastLineGroup === true) {
const prevRenders = renders.slice(0, -1)
const newRenders = [...prevRenders, newRender]
get().updateEditorState({
renders: newRenders,
lineGroups: newLineGroups,
lastLineGroup: curLineGroup,
curLineGroup: [],
})
} else {
const newRenders = [...renders, newRender]
get().updateEditorState({
renders: newRenders,
lineGroups: newLineGroups,
lastLineGroup: curLineGroup,
curLineGroup: [],
})
}
const newRenders = [...renders, newRender]
get().updateEditorState({
renders: newRenders,
lineGroups: newLineGroups,
lastLineGroup: curLineGroup,
curLineGroup: [],
})
} catch (e: any) {
toast({
variant: "destructive",

View File

@@ -8,6 +8,7 @@ export interface ModelInfo {
| "diffusers_sd_inpaint"
| "diffusers_sdxl_inpaint"
| "diffusers_other"
support_strength: boolean
support_controlnet: boolean
controlnets: string[]
support_freeu: boolean