update
This commit is contained in:
@@ -66,6 +66,7 @@ const Cropper = (props: Props) => {
|
||||
imageWidth,
|
||||
imageHeight,
|
||||
isInpainting,
|
||||
isSD,
|
||||
{ x, y, width, height },
|
||||
setX,
|
||||
setY,
|
||||
@@ -77,6 +78,7 @@ const Cropper = (props: Props) => {
|
||||
state.imageWidth,
|
||||
state.imageHeight,
|
||||
state.isInpainting,
|
||||
state.isSD(),
|
||||
state.cropperState,
|
||||
state.setCropperX,
|
||||
state.setCropperY,
|
||||
@@ -377,7 +379,7 @@ const Cropper = (props: Props) => {
|
||||
)
|
||||
}
|
||||
|
||||
if (show === false) {
|
||||
if (show === false || !isSD) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import * as React from "react"
|
||||
import io from "socket.io-client"
|
||||
import { Progress } from "./ui/progress"
|
||||
import { useStore } from "@/lib/states"
|
||||
import { MODEL_TYPE_INPAINT } from "@/lib/const"
|
||||
|
||||
export const API_ENDPOINT = import.meta.env.VITE_BACKEND
|
||||
? import.meta.env.VITE_BACKEND
|
||||
@@ -10,16 +9,16 @@ export const API_ENDPOINT = import.meta.env.VITE_BACKEND
|
||||
const socket = io(API_ENDPOINT)
|
||||
|
||||
const DiffusionProgress = () => {
|
||||
const [settings, isInpainting] = useStore((state) => [
|
||||
const [settings, isInpainting, isSD] = useStore((state) => [
|
||||
state.settings,
|
||||
state.isInpainting,
|
||||
state.isSD(),
|
||||
])
|
||||
|
||||
const [isConnected, setIsConnected] = React.useState(false)
|
||||
const [step, setStep] = React.useState(0)
|
||||
|
||||
const progress = Math.min(Math.round((step / settings.sdSteps) * 100), 100)
|
||||
const isSD = settings.model.model_type !== MODEL_TYPE_INPAINT
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!isSD) {
|
||||
|
||||
@@ -604,7 +604,7 @@ export default function Editor(props: EditorProps) {
|
||||
)
|
||||
|
||||
useHotKey(
|
||||
"ctrl+c, cmd+c",
|
||||
"ctrl+c,meta+c",
|
||||
async () => {
|
||||
const hasPermission = await askWritePermission()
|
||||
if (hasPermission && renders.length > 0) {
|
||||
|
||||
@@ -48,6 +48,7 @@ const Extender = (props: Props) => {
|
||||
isInpainting,
|
||||
imageHeight,
|
||||
imageWdith,
|
||||
isSD,
|
||||
{ x, y, width, height },
|
||||
setX,
|
||||
setY,
|
||||
@@ -60,6 +61,7 @@ const Extender = (props: Props) => {
|
||||
state.isInpainting,
|
||||
state.imageHeight,
|
||||
state.imageWidth,
|
||||
state.isSD(),
|
||||
state.extenderState,
|
||||
state.setExtenderX,
|
||||
state.setExtenderY,
|
||||
@@ -391,7 +393,7 @@ const Extender = (props: Props) => {
|
||||
)
|
||||
}
|
||||
|
||||
if (show === false) {
|
||||
if (show === false || !isSD) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user