Updated Version to 0.7.2 (#17)
This commit is contained in:
2
.github/workflows/github-actions-builder.yml
vendored
2
.github/workflows/github-actions-builder.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-20.04,macos-latest,windows-latest]
|
||||
platform: [ubuntu-20.04,macos-latest]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "RisuAI",
|
||||
"version": "0.7.1"
|
||||
"version": "0.7.2"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
||||
@@ -57,7 +57,9 @@ export const languageEnglish = {
|
||||
+ "- **Modify Request Data** modifys current chat data when sent.\n\nIN must be a regex without flags and *\\*.\n\nOUT is a normal string."
|
||||
+ "\n\n If OUT starts with **@@**, it doesn't replaces the string, but instead does a special effect if matching string founds."
|
||||
+ "\n\n- @@emo (emotion name)\n\n if character is Emotion Images mode, sets (emotion name) as emotion and prevents default.",
|
||||
experimental: "This is a experimental setting. it might be unstable."
|
||||
experimental: "This is a experimental setting. it might be unstable.",
|
||||
oogaboogaURL: "If your WebUI supports older version of api, your url should look *like https:.../run/textgen*\n\n"
|
||||
+ "If your WebUI supports newVersion of api, your url should look like *https://.../api/v1/generate* and use the api server as host, and add --api to arguments."
|
||||
},
|
||||
setup: {
|
||||
chooseProvider: "Choose AI Provider",
|
||||
|
||||
@@ -127,10 +127,13 @@
|
||||
</select>
|
||||
{/if}
|
||||
{#if $DataBase.aiModel === 'textgen_webui' || $DataBase.subModel === 'textgen_webui'}
|
||||
<span class="text-neutral-200">TextGen {language.providerURL}</span>
|
||||
<span class="text-neutral-200">TextGen {language.providerURL} <Help key="oogaboogaURL"/></span>
|
||||
<input class="text-neutral-200 mb-4 p-2 bg-transparent input-text focus:bg-selected" placeholder="https://..." bind:value={$DataBase.textgenWebUIURL}>
|
||||
<span class="text-draculared text-xs mb-2">You must use WebUI without agpl license or use unmodified version with agpl license to observe the contents of the agpl license.</span>
|
||||
<span class="text-draculared text-xs mb-2">You must use textgen webui with --no-stream and without --cai-chat or --chat</span>
|
||||
{#if !isTauri}
|
||||
<span class="text-draculared text-xs mb-2">You are using web version. you must use ngrok or other tunnels to use your local webui.</span>
|
||||
{/if}
|
||||
{/if}
|
||||
<span class="text-neutral-200">{language.mainPrompt} <Help key="mainprompt"/></span>
|
||||
<textarea class="bg-transparent input-text mt-2 mb-2 text-gray-200 resize-none h-20 focus:bg-selected text-xs" autocomplete="off" bind:value={$DataBase.mainPrompt}></textarea>
|
||||
@@ -246,9 +249,6 @@
|
||||
{/if}
|
||||
<span class="text-neutral-200 mt-2">WebUI {language.providerURL}</span>
|
||||
<input class="text-neutral-200 mb-4 p-2 bg-transparent input-text focus:bg-selected text-sm" placeholder="https://..." bind:value={$DataBase.webUiUrl}>
|
||||
{/if}
|
||||
|
||||
|
||||
<span class="text-neutral-200">Steps</span>
|
||||
<input class="text-neutral-200 mb-4 p-2 bg-transparent input-text focus:bg-selected text-sm" type="number" min={0} max="100" bind:value={$DataBase.sdSteps}>
|
||||
|
||||
@@ -262,7 +262,30 @@
|
||||
<span class="text-neutral-200">Sampler</span>
|
||||
<input class="text-neutral-200 mb-4 p-2 bg-transparent input-text focus:bg-selected text-sm" bind:value={$DataBase.sdConfig.sampler_name}>
|
||||
|
||||
{:else if subMenu === 3}
|
||||
<span class="text-neutral-200">Upscaler</span>
|
||||
<select class="bg-transparent input-text mt-2 mb-4 text-gray-200 appearance-none text-sm" bind:value={$DataBase.sdConfig.enable_hr}>
|
||||
<option value="false" class="bg-darkbg appearance-none">Disable</option>
|
||||
<option value="true" class="bg-darkbg appearance-none">Enable</option>
|
||||
</select>
|
||||
<div class="flex items-center mt-2">
|
||||
<Check bind:check={$DataBase.sdConfig.enable_hr}/>
|
||||
<span>Enable Hires</span>
|
||||
</div>
|
||||
{#if $DataBase.sdConfig.enable_hr === true}
|
||||
<span class="text-neutral-200">denoising_strength</span>
|
||||
<input class="text-neutral-200 mb-4 p-2 bg-transparent input-text focus:bg-selected text-sm" type="number" min={0} max="10" bind:value={$DataBase.sdConfig.denoising_strength}>
|
||||
<span class="text-neutral-200">hr_scale</span>
|
||||
<input class="text-neutral-200 mb-4 p-2 bg-transparent input-text focus:bg-selected text-sm" type="number" min={0} max="10" bind:value={$DataBase.sdConfig.hr_scale}>
|
||||
<span class="text-neutral-200">Upscaler</span>
|
||||
<input class="text-neutral-200 mb-4 p-2 bg-transparent input-text focus:bg-selected text-sm" bind:value={$DataBase.sdConfig.hr_upscaler}>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{:else if subMenu == 3}
|
||||
<h2 class="mb-2 text-2xl font-bold mt-2">{language.display}</h2>
|
||||
<span class="text-neutral-200 mt-4">{language.UiLanguage}</span>
|
||||
<select class="bg-transparent input-text mt-2 text-gray-200 appearance-none text-sm" bind:value={$DataBase.language} on:change={async () => {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { saveImage as saveImageGlobal } from './globalApi';
|
||||
|
||||
export const DataBase = writable({} as any as Database)
|
||||
export const loadedStore = writable(false)
|
||||
export let appVer = '0.7.1'
|
||||
export let appVer = '0.7.2'
|
||||
|
||||
|
||||
export function setDatabase(data:Database){
|
||||
@@ -177,8 +177,9 @@ export function setDatabase(data:Database){
|
||||
height:512,
|
||||
sampler_name:"Euler a",
|
||||
script_name:"",
|
||||
denoising_strength:0.7,
|
||||
enable_hr:false,
|
||||
hr_scale: 2,
|
||||
hr_scale:1.25,
|
||||
hr_upscaler:"Latent"
|
||||
}
|
||||
}
|
||||
@@ -346,6 +347,7 @@ interface sdConfig{
|
||||
height:number
|
||||
sampler_name:string
|
||||
script_name:string
|
||||
denoising_strength:number
|
||||
enable_hr:boolean
|
||||
hr_scale: number
|
||||
hr_upscaler:string
|
||||
|
||||
@@ -109,17 +109,33 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
}
|
||||
case "textgen_webui":{
|
||||
let DURL = db.textgenWebUIURL
|
||||
if((!DURL.endsWith('textgen')) && (!DURL.endsWith('textgen/'))){
|
||||
if(DURL.endsWith('/')){
|
||||
DURL += 'run/textgen'
|
||||
let bodyTemplate:any
|
||||
const proompt = stringlizeChat(formated, currentChar.name)
|
||||
if(DURL.includes('api')){
|
||||
bodyTemplate = {
|
||||
'max_new_tokens': 80,
|
||||
'do_sample': true,
|
||||
'temperature': (db.temperature / 100),
|
||||
'top_p': 0.9,
|
||||
'typical_p': 1,
|
||||
'repetition_penalty': (db.PresensePenalty / 100),
|
||||
'encoder_repetition_penalty': 1,
|
||||
'top_k': 100,
|
||||
'min_length': 0,
|
||||
'no_repeat_ngram_size': 0,
|
||||
'num_beams': 1,
|
||||
'penalty_alpha': 0,
|
||||
'length_penalty': 1,
|
||||
'early_stopping': false,
|
||||
'truncation_length': maxTokens,
|
||||
'ban_eos_token': false,
|
||||
'custom_stopping_strings': [`\nUser:`,`\nuser:`],
|
||||
'seed': -1,
|
||||
add_bos_token: true,
|
||||
prompt: proompt
|
||||
}
|
||||
}
|
||||
else{
|
||||
DURL += '/run/textgen'
|
||||
}
|
||||
}
|
||||
|
||||
const proompt = stringlizeChat(formated, currentChar.name)
|
||||
|
||||
const payload = [
|
||||
proompt,
|
||||
{
|
||||
@@ -139,14 +155,15 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
'early_stopping': false,
|
||||
'truncation_length': maxTokens,
|
||||
'ban_eos_token': false,
|
||||
'custom_stopping_strings': [`\nUser:`],
|
||||
'custom_stopping_strings': [`\nUser:`,`\nuser:`],
|
||||
'seed': -1,
|
||||
add_bos_token: true,
|
||||
}
|
||||
];
|
||||
|
||||
const bodyTemplate = { "data": [JSON.stringify(payload)] };
|
||||
bodyTemplate = { "data": [JSON.stringify(payload)] };
|
||||
|
||||
}
|
||||
const res = await globalFetch(DURL, {
|
||||
body: bodyTemplate,
|
||||
headers: {}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { requestChatData } from "./request"
|
||||
import { alertError } from "../alert"
|
||||
import { globalFetch } from "../globalApi"
|
||||
import { CharEmotion } from "../stores"
|
||||
import type { OpenAIChat } from "."
|
||||
|
||||
|
||||
export async function stableDiff(currentChar:character,prompt:string){
|
||||
@@ -128,7 +129,14 @@ export async function stableDiff(currentChar:character,prompt:string){
|
||||
"cfg_scale": db.sdCFG,
|
||||
"prompt": prompts.join(','),
|
||||
"negative_prompt": neg,
|
||||
'sampler_name': db.sdConfig.sampler_name
|
||||
'sampler_name': db.sdConfig.sampler_name,
|
||||
"enable_hr": db.sdConfig.enable_hr,
|
||||
"denoising_strength": db.sdConfig.denoising_strength,
|
||||
"hr_scale": db.sdConfig.hr_scale,
|
||||
"hr_upscaler": db.sdConfig.hr_upscaler
|
||||
},
|
||||
headers:{
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ export function stringlizeChat(formated:OpenAIChat[], char:string = ''){
|
||||
resultString.push("'System Note: " + form.content)
|
||||
}
|
||||
else if(form.role === 'user'){
|
||||
resultString.push("User: " + form.content)
|
||||
resultString.push("user: " + form.content)
|
||||
}
|
||||
else if(form.role === 'assistant'){
|
||||
resultString.push("Assistant: " + form.content)
|
||||
resultString.push("assistant: " + form.content)
|
||||
}
|
||||
}
|
||||
return resultString.join('\n\n') + `\n\n${char}:`
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":"0.7.1"}
|
||||
{"version":"0.7.2"}
|
||||
|
||||
Reference in New Issue
Block a user