Browse Source

- Improvement: "read-only" custom masks now show the "generate" button with a tooltip indicating that the next mask should be used.

- Improvement: Added status message in the run box to indicate which algorithm is working on the photo.
- Improvement: Now it is also saved if the window has been maximized and restores this state when starting the application.
- Improvement: Tooltips show faster.
- The "Use Python" option has been removed. Now the env variable POWER_PYTHON must be defined, optionally the value can be the Python path.
tags/v1.5.6
Ivan Bravo Bravo 3 months ago
parent
commit
892eed5e08

+ 2
- 1
src/assets/css/components/_button.scss View File

@@ -21,7 +21,8 @@
@apply bg-button-dark;
}

&[disabled] {
&[disabled],
&.button--disabled {
@apply opacity-50 cursor-not-allowed;
}


+ 4
- 0
src/components/Help/HelpLesson.vue View File

@@ -96,6 +96,10 @@ export default {
height: 180px;
}

.box__content {
@apply pt-3;
}

.photo--drag {
background-image: url('~assets/images/undraw/undraw_throw_down_ub2l.svg')
}

+ 7
- 0
src/components/Nudify/NudifyMaskPhoto.vue View File

@@ -86,6 +86,13 @@
@click="generate()">
<FontAwesomeIcon icon="play" />
</button>

<button v-else-if="mask.isReadOnly && mask.nextMask"
key="play-disabled"
v-tooltip="'This mask will be generated with the next.'"
class="button button--success button--sm button--disabled">
<FontAwesomeIcon icon="play" />
</button>
</div>

<!-- Terminal Dialog -->

+ 22
- 0
src/components/Nudify/NudifyPhotoRun.vue View File

@@ -1,5 +1,6 @@
<template>
<div class="box run" :class="previewClass">
<!-- Preview -->
<div class="box__photo run__photo">
<video v-if="file.exists && isVideo"
:src="file.url"
@@ -15,8 +16,15 @@
:style="{ backgroundImage: `url('${file.url}')` }"
data-private
@click="openPreview" />

<div v-if="run.algorithmStatus !== ALGORITHM.NONE" class="run__photo__status">
<span v-if="run.algorithmStatus === ALGORITHM.DREAMPOWER" key="dreampower" v-tooltip="'The photo is being nudified by DreamPower.'">Nudifying</span>
<span v-if="run.algorithmStatus === ALGORITHM.WAIFU2X" key="waifu2x" v-tooltip="'The photo is being upscaled by Waifu2X.'">Upscaling</span>
<span v-if="run.algorithmStatus === ALGORITHM.DREAMTIME" key="dreamtime" v-tooltip="'The photo is being prepared by DreamTime.'">Other</span>
</div>
</div>

<!-- Preferences -->
<div
v-if="run.preferences.body.randomize || run.preferences.body.progressive.enabled"
class="run__preferences">
@@ -46,6 +54,7 @@
</div>
</div>

<!-- Buttons -->
<div class="box__footer buttons">
<div v-if="run.running" key="button-status" class="button button--sm">
<span class="icon">
@@ -147,6 +156,7 @@
<script>
import { dreamtrack } from '~/modules/services'
import { Nudify } from '~/modules/nudify'
import { ALGORITHM } from '~/modules/nudify/photo-run'

export default {
filters: {
@@ -166,6 +176,10 @@ export default {
},
},

data: () => ({
ALGORITHM,
}),

computed: {
isVideo() {
return this.run.photo.file.isVideo
@@ -260,6 +274,14 @@ export default {
cursor: zoom-in;
}

.run__photo__status {
@apply absolute z-20;
@apply bg-primary py-2 px-6 rounded-br rounded-tr text-black font-semibold;
left: 0;
top: 20px;
cursor: help;
}

.run__video__preview {
@apply h-full w-full overflow-hidden;
cursor: zoom-in;

+ 1
- 1
src/components/UI/AppAds.vue View File

@@ -15,7 +15,7 @@ import { settings } from '~/modules/system'
import { dreamtrack } from '~/modules/services'
import { Help, events } from '~/modules'

const CHANGE_INTERVAL = process.env.NODE_ENV === 'development' ? 15 * 1000 : 15 * 60 * 1000
const CHANGE_INTERVAL = process.env.NODE_ENV === 'development' ? 60 * 1000 : 15 * 60 * 1000

export default {
data: () => ({

+ 14
- 1
src/electron/src/index.js View File

@@ -276,7 +276,10 @@ class DreamApp {
//
this.window.webContents.once('dom-ready', () => {
this.window.show()
// this.window.maximize()

if (settings.get('app.window.maximized', true)) {
this.window.maximize()
}
})

// Resize
@@ -286,6 +289,16 @@ class DreamApp {
settings.save()
}, 1000))

this.window.on('maximize', function () {
settings.set('app.window.maximized', true)
settings.save()
})

this.window.on('unmaximize', function () {
settings.set('app.window.maximized', false)
settings.save()
})

// ui location
this.interfaceURL = this.getInterfaceURL()


+ 20
- 2
src/electron/src/modules/settings.js View File

@@ -136,7 +136,7 @@ class Settings {
const hasGPU = process.platform === 'darwin' ? false : system.graphics.length > 0

this.payload = {
version: 10,
version: 11,
user: uuid(),

wizard: {
@@ -161,6 +161,7 @@ class Settings {
window: {
width: 1200,
height: 700,
maximized: true,
},
},

@@ -185,7 +186,6 @@ class Settings {
processing: {
gpus: [0],
cores: 1,
usePython: false,
},

preferences: {
@@ -511,6 +511,24 @@ class Settings {
})
}

// 10 -> 11
if (this.payload?.version === 10 && this._default.version >= 11) {
this.payload = merge(this.payload, {
version: 11,
app: {
window: {
maximized: true,
},
},
})

try {
delete this.payload.processing.usePython
} catch (err) {
logger.warn(err)
}
}

this.save()
}
}

+ 7
- 9
src/electron/src/modules/tools/power.js View File

@@ -22,22 +22,20 @@ let version
export function exec(args, options = {}) {
args.push('--debug')

if (settings.processing.usePython) {
// python script
if (process.env.POWER_PYTHON) {
// Main script
args.unshift('main.py')

// C:\\Users\\koles\\Anaconda3\\envs\\dreampower\\python
const pythonPath = fs.existsSync(process.env.POWER_PYTHON) ? process.env.POWER_PYTHON : 'python'

logger.debug('[Python] Running:', {
pythonPath,
args,
options,
})

// FIXME: Anaconda support.
/* return spawn('C:\\Users\\koles\\Anaconda3\\envs\\dreampower\\python', args, {
cwd: getPowerPath(),
...options,
}) */

return spawn('python', args, {
return spawn(pythonPath, args, {
cwd: getPowerPath(),
...options,
})

+ 7
- 6
src/electron/src/modules/tools/waifu.js View File

@@ -25,19 +25,20 @@ export function exec(args, options = {}) {
...options,
}

if (settings.processing.usePython) {
// Python Script
if (process.env.WAIFU_PYTHON) {
// Main Script
args.unshift('waifu2x.py')

// C:\\Users\\koles\\Anaconda3\\envs\\waifu\\python
const pythonPath = fs.existsSync(process.env.WAIFU_PYTHON) ? process.env.WAIFU_PYTHON : 'python'

logger.debug('[Python] Running:', {
pythonPath,
args,
options,
})

// FIXME: Anaconda Support.
// return spawn('C:\\Users\\koles\\Anaconda3\\envs\\waifu\\python', args, options)

return spawn('python', args, options)
return spawn(pythonPath, args, options)
}

logger.debug('Running:', args)

+ 20
- 0
src/modules/nudify/photo-run.js View File

@@ -27,6 +27,13 @@ const { getCurrentWindow } = require('electron').remote

const { power, waifu } = $provider

export const ALGORITHM = {
NONE: -1,
DREAMPOWER: 0,
WAIFU2X: 1,
DREAMTIME: 2,
}

export class PhotoRun {
/**
* @type {string}
@@ -67,6 +74,11 @@ export class PhotoRun {
*/
status = 'pending'

/**
* @type {ALGORITHM}
*/
algorithmStatus = ALGORITHM.NONE

/**
* @type {Boolean}
*/
@@ -274,9 +286,13 @@ export class PhotoRun {
}
}
}

this.algorithmStatus = ALGORITHM.NONE
}

runNudification() {
this.algorithmStatus = ALGORITHM.DREAMPOWER

return new Promise((resolve, reject) => {
const onSpawnError = (error) => {
reject(new Warning(
@@ -353,6 +369,8 @@ export class PhotoRun {
}

runUpscale() {
this.algorithmStatus = ALGORITHM.WAIFU2X

return new Promise((resolve, reject) => {
const onSpawnError = (error) => {
reject(new Warning(
@@ -438,6 +456,8 @@ export class PhotoRun {
output = this.outputFile
}

this.algorithmStatus = ALGORITHM.DREAMTIME

const image = new ImageMagick(input)

await image.crop(this.photo.geometry.crop)

+ 1
- 1
src/package.json View File

@@ -3,7 +3,7 @@
"private": true,
"displayName": "DreamTime",
"description": "Application that uses artificial intelligence to generate fake nudes.",
"version": "1.5.5",
"version": "1.5.6",
"homepage": "https://time.dreamnet.tech",
"main": "electron/dist/index.js",
"license": "GPL-3.0-only",

+ 1
- 1
src/package.min.json View File

@@ -3,7 +3,7 @@
"private": true,
"displayName": "DreamTime",
"description": "Application that uses artificial intelligence to generate fake nudes.",
"version": "1.5.5",
"version": "1.5.6",
"main": "electron/dist/index.js",
"license": "GPL-3.0-only"
}

+ 0
- 2
src/pages/settings/processing.vue View File

@@ -47,8 +47,6 @@
</SettingsField>

<SettingsField field-id="processing.cores" :attrs="{ type: 'number', min: 1, max: $provider.system.cores }" />

<SettingsField field-id="processing.usePython" />
</div>
</section>
</div>

+ 7
- 8
src/pages/wizard/power.vue View File

@@ -7,7 +7,7 @@
</h2>

<h3 class="subtitle">
{{ $dreampower.name }}
{{ $dreampower.name }}. Algorithm for nudification.
</h3>

<template v-slot:right>
@@ -20,12 +20,13 @@

<div class="project__content">
<div v-if="!requirements.power.installed" class="notification notification--warning">
This component needs to be installed to continue using {{ $dreamtime.name }}.
This component needs to be installed to continue.
</div>

<div v-else-if="requirements.power.error" class="notification notification--danger">
<h5>CHECK ERROR!</h5>
Failed to get the installed {{ $dreampower.name }} version. Please fix this problem before continuing.
Failed to get the installed {{ $dreampower.name }} version. Please fix this problem before continuing.<br>
You can visit our <a href="https://chat.dreamnet.tech" target="_blank">chat</a> to get support.
<br><br>

<pre>{{ requirements.power.error.stack }}</pre>
@@ -33,16 +34,16 @@

<div v-else-if="!requirements.power.compatible" class="notification notification--danger">
<h5>OUTDATED</h5>
This component requires an update to continue to be used in this version of {{ $dreamtime.name }}.
This component requires an update to continue.
</div>

<div v-else class="notification">
<div v-if="$dreampower.version" class="notification">
Installed version: <strong>{{ $dreampower.version }}</strong>
</div>

<div v-if="updater.error" class="notification notification--danger">
<h5>CONNECTION ERROR!</h5>
<span>It is not possible to update this component because a problem has occurred when trying to get the information from Github, please make sure you have a stable internet connection and restart the application.</span>
<span>A problem has occurred when trying to get the information from Github, please make sure you have a stable internet connection and restart the application.</span>
<br><br>

<pre>
@@ -78,8 +79,6 @@
:style="{ cursor: 'pointer' }"
@click.prevent="changePower">
</SettingsField>

<SettingsField field-id="processing.usePython" />
</AppBox>
</div>
</div>

+ 15
- 12
src/pages/wizard/telemetry.vue View File

@@ -12,26 +12,26 @@
</PageHeader>

<div class="user__content">
<section class="telemetry__notice">
<AppBox title="Privacy" class="telemetry__notice">
<p>
DreamNet respects your privacy, <strong>the photos you generate with DreamTime will not leave your computer in any way</strong>, the only information we send to our servers is to generate anonymous statistics or error reports to improve the application.
DreamNet respects your privacy, <strong>the photos you generate with DreamTime will not leave your computer in any way</strong>.
</p>

<p>
Below you can change the telemetry settings:
Below you can see the information we send to our servers and the option to change the telemetry.
</p>
</section>
</AppBox>

<div class="wizard__footer">
<button class="button button--xl" @click="next">
Continue
</button>
<div class="notification">
<span class="icon"><font-awesome-icon icon="info-circle" /></span>
<span>Changing this options needs a restart to take effect.</span>
</div>

<div class="telemetry__boxes">
<AppBox title="Analytics." subtitle="Information to generate anonymous statistics.">
<ul>
<li>Operating system.</li>
<li>CPU, RAM and GPU.</li>
<li>Country.</li>
<li>Important events.</li>
</ul>
@@ -39,7 +39,7 @@
<SettingsField field-id="user" readonly />
</AppBox>

<AppBox title="Bug report." subtitle="Detailed information when a error occurs.">
<AppBox title="Bug report." subtitle="Information about an error.">
<ul>
<li>Operating system.</li>
<li>CPU, RAM and GPU.</li>
@@ -60,14 +60,15 @@

<AppBox title="Session tracking." subtitle="Detailed information on how you use the application.">
<p>
This helps us know how we can make the application more accessible, also provides additional data to fix errors.
This information helps us make the application more accessible, easy to use and provides additional data to fix errors.
</p>

<ul>
<li>Operating system.</li>
<li>Actions.</li>
<li>Mouse movement inside the application. (Photos and sensitive information are censored.)</li>
<li>CPU, RAM and GPU.</li>
<li>User settings.</li>
<li>Console log.</li>
<li>Actions inside the application. (Photos and sensitive information are censored.)</li>
</ul>

<SettingsField field-id="telemetry.dom" />
@@ -128,6 +129,8 @@ export default {
}

.telemetry__boxes {
@apply grid grid-cols-2 gap-6;

ul {
@apply list-disc ml-6;
}

+ 6
- 7
src/pages/wizard/waifu.vue View File

@@ -7,7 +7,7 @@
</h2>

<h3 class="subtitle">
{{ $waifu.name }}
{{ $waifu.name }}. Optional algorithm to upscale photos.
</h3>

<template v-slot:right>
@@ -21,7 +21,8 @@
<div class="project__content">
<div v-if="requirements.waifu.error" class="notification notification--danger">
<h5>CHECK ERROR!</h5>
Failed to get the installed {{ $waifu.name }} version. Please fix this problem before continuing.
Failed to get the installed {{ $dreampower.name }} version. Please fix this problem before continuing.<br>
You can visit our <a href="https://chat.dreamnet.tech" target="_blank">chat</a> to get support.
<br><br>

<pre>{{ requirements.waifu.error.stack }}</pre>
@@ -29,10 +30,10 @@

<div v-else-if="requirements.waifu.installed && !requirements.waifu.compatible" class="notification notification--danger">
<h5>OUTDATED</h5>
This component requires an update to continue to be used in this version of {{ $dreamtime.name }}.
This component requires an update to continue.
</div>

<div v-else-if="requirements.waifu.installed" class="notification">
<div v-if="$waifu.version" class="notification">
Installed version: <strong>{{ $waifu.version }}</strong>
</div>

@@ -48,7 +49,7 @@

<div v-if="updater.error" class="notification notification--danger">
<h5>CONNECTION ERROR!</h5>
<span>It is not possible to update this component because a problem has occurred when trying to get the information from Github, please make sure you have a stable internet connection and restart the application.</span>
<span>A problem has occurred when trying to get the information from Github, please make sure you have a stable internet connection and restart the application.</span>
<br><br>

<pre>
@@ -70,8 +71,6 @@
title="Change"
@click="changeWaifu">
</SettingsField>

<SettingsField field-id="processing.usePython" />
</AppBox>
</div>


+ 1
- 1
src/pages/wizard/welcome.vue View File

@@ -13,7 +13,7 @@
</h2>

<button class="button button--xl" @click="next">
Continue!
Continue
</button>
</div>
</template>

+ 1
- 1
src/plugins/setup.js View File

@@ -27,7 +27,7 @@ Vue.mixin(BaseMixin)

// tippyjs
tippy.setDefaultProps({
delay: [500, 0],
delay: [200, 0],
arrow: true,
allowHTML: true,
})

+ 1
- 1
src/yarn.lock View File

@@ -7,7 +7,7 @@
resolved "https://npm.dreamnet.tech/7zip-bin/-/7zip-bin-5.0.3.tgz#bc5b5532ecafd923a61f2fb097e3b108c0106a3f"
integrity sha512-GLyWIFBbGvpKPGo55JyRZAo4lVbnBiD52cKlw/0Vt+wnmKvWJkpZvsjVoaIolyBXDeAQKSicRtqFNPem9w0WYA==

"@adonisjs/websocket-client@^1.0.9":
"@adonisjs/websocket-client@1.0.9":
version "1.0.9"
resolved "https://npm.dreamnet.tech/@adonisjs%2fwebsocket-client/-/websocket-client-1.0.9.tgz#94f018489e68e05425046b053478d44ed003b827"
integrity sha512-GhHmGgyylwYUB+lBMt6KFPEQo1tck4Pn1n/aFs23CydcdChJfy4Yhtn+edqTtIYS+HTpbvXNvqn2z4EiS/xZOg==

Loading…
Cancel
Save