Skip to content

Commit

Permalink
Merge pull request #78 from SRVFI-Raws/main
Browse files Browse the repository at this point in the history
流水很清楚惜花這個責任
  • Loading branch information
DamnCrab authored Jul 19, 2023
2 parents 928ae89 + 130e703 commit fd28d8e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/renderer/src/store/SRSettingsStore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ref } from 'vue'
import { ref, Ref } from 'vue'
import { defineStore } from 'pinia'

export const useSRSettingsStore = defineStore(
Expand All @@ -8,7 +8,7 @@ export const useSRSettingsStore = defineStore(
const selectedScale = ref(2)
const selectedNoise = ref(-1)
const useTTA = ref(false)
const CustomScaleValue = ref(0)
const CustomScaleValue: Ref<number | null> = ref(null)

return {
selectedModel,
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/store/globalSettingsStore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ref } from 'vue'
import { ref, Ref } from 'vue'
import { defineStore } from 'pinia'
import { LogInst } from 'naive-ui'

Expand All @@ -12,7 +12,7 @@ export const useGlobalSettingsStore = defineStore(
const langsNum = ref(0)

const SRgpuid = ref(114514)
const deviceList = ref([])
const deviceList: Ref<any[]> = ref([])

const ProgressPercentage = ref(0)
const CommandLOG = ref('')
Expand Down
5 changes: 3 additions & 2 deletions src/renderer/src/utils/getFinal2xconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,17 @@ export const getFinal2xconfig = (): string => {
)
const { SRgpuid } = storeToRefs(useGlobalSettingsStore())
const gpuID = SRgpuid.value === 114514 ? 0 : SRgpuid.value
const outputPATH = ioPath.getoutputpath()
const inputPATHList = ioPath.getList()
const outputPATH = ioPath.getoutputpath()
const targetScale = CustomScaleValue.value === null ? 0 : CustomScaleValue.value
return JSON.stringify({
gpuid: gpuID,
inputpath: inputPATHList,
model: selectedModel.value,
modelscale: selectedScale.value,
modelnoise: selectedNoise.value,
outputpath: outputPATH,
targetscale: CustomScaleValue.value,
targetscale: targetScale,
tta: useTTA.value
})
}
1 change: 1 addition & 0 deletions src/renderer/src/views/Final2xSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ class ClickButtomToConsoleLog {
:max="99999999"
:min="0"
:step="0.2"
placeholder="Default"
style="width: 110px"
/>
</n-space>
Expand Down

0 comments on commit fd28d8e

Please sign in to comment.