not disable strength when brushNet is enabled

This commit is contained in:
Qing 2024-04-30 09:07:59 +08:00
parent 2ab0d089f0
commit acd5726ecb

View File

@ -427,12 +427,11 @@ const DiffusionOptions = () => {
return null return null
} }
let disable = settings.enableBrushNet
let toolTip = let toolTip =
"Strength is a measure of how much noise is added to the base image, which influences how similar the output is to the base image. Higher value means more noise and more different from the base image" "Strength is a measure of how much noise is added to the base image, which influences how similar the output is to the base image. Higher value means more noise and more different from the base image"
if (disable) { // if (disable) {
toolTip = "BrushNet is enabled, Strength is disabled." // toolTip = "BrushNet is enabled, Strength is disabled."
} // }
return ( return (
<RowContainer> <RowContainer>
@ -440,7 +439,7 @@ const DiffusionOptions = () => {
text="Strength" text="Strength"
url="https://huggingface.co/docs/diffusers/main/en/using-diffusers/inpaint#strength" url="https://huggingface.co/docs/diffusers/main/en/using-diffusers/inpaint#strength"
toolTip={toolTip} toolTip={toolTip}
disabled={disable} // disabled={disable}
/> />
<Slider <Slider
className="w-[100px]" className="w-[100px]"
@ -452,7 +451,7 @@ const DiffusionOptions = () => {
onValueChange={(vals) => onValueChange={(vals) =>
updateSettings({ sdStrength: vals[0] / 100 }) updateSettings({ sdStrength: vals[0] / 100 })
} }
disabled={disable} // disabled={disable}
/> />
<NumberInput <NumberInput
id="strength" id="strength"
@ -462,7 +461,7 @@ const DiffusionOptions = () => {
onNumberValueChange={(val) => { onNumberValueChange={(val) => {
updateSettings({ sdStrength: val }) updateSettings({ sdStrength: val })
}} }}
disabled={disable} // disabled={disable}
/> />
</RowContainer> </RowContainer>
) )