Browse Source

Merge branch 'canary' of https://github.com/private-dreamnet/dreampower into canary

tags/v1.2.10
deeppppp 1 year ago
parent
commit
373a6e3f0b
8 changed files with 74 additions and 161 deletions
  1. 1
    9
      .github/FUNDING.yml
  2. 3
    1
      .github/stale.yml
  3. 10
    21
      .github/workflows/ci.yml
  4. 28
    41
      README.md
  5. BIN
      assets/preview.png
  6. 2
    2
      config.py
  7. 1
    4
      scripts/package.json
  8. 29
    83
      scripts/release.js

+ 1
- 9
.github/FUNDING.yml View File

@@ -1,12 +1,4 @@
# These are supported funding model platforms

#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: deepmanyy # Replace with a single Patreon username
#open_collective: # Replace with a single Open Collective username
ko_fi: deepmanyy # Replace with a single Ko-fi username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
#liberapay: # Replace with a single Liberapay username
#issuehunt: # Replace with a single IssueHunt username
#otechie: # Replace with a single Otechie username
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
patreon: dreampower # Replace with a single Patreon username

+ 3
- 1
.github/stale.yml View File

@@ -1,11 +1,13 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- documentation
- enhancement
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable

+ 10
- 21
.github/workflows/ci.yml View File

@@ -1,9 +1,8 @@
name: CI
name: CI/CD

on:
push:
branches:
- master
- canary
tags:
- v*
@@ -14,7 +13,7 @@ on:

jobs:
build:
name: Build (${{ matrix.os-short }}-${{ matrix.device }})
name: Build (${{ matrix.os-short }}-${{ matrix.platform }})
runs-on: ${{ matrix.os }}

# Strategy
@@ -27,42 +26,33 @@ jobs:
- ubuntu-latest
- windows-latest
- macOS-latest
device:
platform:
- any
- cpuonly

include:
- os: ubuntu-latest # Ubuntu
os-short: ubuntu
os-ext: deb
python: python3
- os: ubuntu-latest # Ubuntu & CPU
device: cpuonly
platform: cpuonly
setup-args: --cpu
- os: windows-latest # Windows
os-short: windows
os-ext: exe
python: python
- os: windows-latest # Windows & CPU
device: cpuonly
platform: cpuonly
setup-args: --cpu
- os: macOS-latest # macOS
os-short: macos
os-ext: dmg
python: python3
setup-args: --cpu

exclude:
- os: macOS-latest
device: any
platform: any

steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
continue-on-error: true

- uses: actions/checkout@v1
with:
submodules: true
@@ -96,20 +86,19 @@ jobs:
run: |
${{ matrix.python }} setup.py --debug --pip_no_cache_dir ${{ matrix.setup-args }}

- name: Build - DreamPower
- name: Build
working-directory: scripts
run: |
${{ matrix.python }} build.py --debug

- name: Deploy
- name: Release
working-directory: scripts
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
BUILD_DEVICE: ${{ matrix.device }}
BUILD_OS: ${{ matrix.os-short }}
BUILD_PLATFORM: ${{ matrix.platform }}
run: |
node release.js

+ 28
- 41
README.md View File

@@ -1,83 +1,71 @@
![](assets/dreampower.png)

[![Build Status](https://github.com/private-dreamnet/dreampower/workflows/CI/badge.svg)](https://github.com/private-dreamnet/dreampower/actions)
[![GitHub All Releases](https://img.shields.io/github/downloads/private-dreamnet/dreampower/total?logo=github&logoColor=white)](https://github.com/private-dreamnet/dreampower/releases)
[![Build Status](https://github.com/dreamnettech/dreampower/workflows/CI/CD/badge.svg)](https://github.com/dreamnettech/dreampower/actions)
[![GitHub All Releases](https://img.shields.io/github/downloads/dreamnettech/dreampower/total?logo=github&logoColor=white)](https://github.com/dreamnettech/dreampower/releases)

![GitHub](https://img.shields.io/github/license/private-dreamnet/dreampower)
![GitHub top language](https://img.shields.io/github/languages/top/private-dreamnet/dreampower)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fcea261a567c47109419d0572160fecf)](https://www.codacy.com/app/kolessios/dreampower?utm_source=github.com&utm_medium=referral&utm_content=private-dreamnet/dreampower&utm_campaign=Badge_Grade)
[![Maintainability](https://api.codeclimate.com/v1/badges/c8cd0a0f104820adc2ba/maintainability)](https://codeclimate.com/github/private-dreamnet/dreampower/maintainability)
![GitHub](https://img.shields.io/github/license/dreamnettech/dreampower)
![GitHub top language](https://img.shields.io/github/languages/top/dreamnettech/dreampower)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fcea261a567c47109419d0572160fecf)](https://www.codacy.com/app/kolessios/dreampower?utm_source=github.com&utm_medium=referral&utm_content=dreamnettech/dreampower&utm_campaign=Badge_Grade)
[![Maintainability](https://api.codeclimate.com/v1/badges/c8cd0a0f104820adc2ba/maintainability)](https://codeclimate.com/github/dreamnettech/dreampower/maintainability)

# DreamPower

DreamPower is a deep learning algorithm based on [DeepNude](https://github.com/stacklikemind/deepnude_official) with the ability to predict what a naked person's body looks like.
DreamPower is a deep learning algorithm based on [DeepNude](https://github.com/stacklikemind/deepnude_official) with the ability to nudify photos of people.

DreamPower is a CLI application, if you are looking for a **friendly way** to use DreamPower, please use the user interface: [DreamTime](https://time.dreamnet.tech).
DreamPower is a CLI application. If you have no experience in terminals you can use [DreamTime](https://time.dreamnet.tech), an easy way to use the power of DreamPower.

![](assets/preview.png)

## Differences with DeepNude
> If you want to share or modify this software please do it for the same purpose as we do and always release the source code of your modifications. Read the [LICENSE](LICENSE) for more information.

DreamPower is a fork of [deepnude_official](https://github.com/stacklikemind/deepnude_official) but with constant improvements from the developers of DreamNet and the world, we stand out for offering these features:
## Better than DeepNude.

DreamPower is a fork of [deepnude_official](https://github.com/stacklikemind/deepnude_official) but with constant improvements from DreamNet developers and the world, we stand out for offering these features:

- GPU Processing (Transformation in ~10 seconds!)
- Multiple GPU support
- Multithreading
- Auto-resize, auto-rescale, etc
- Support to transform animated GIFs
- Animated GIFs support
- Customization: size of boobs, pubic hair, etc.
- Constant updates!

## DreamNet

Join the DreamNet social networks, the community interested in developing this technology. You can also join just to talk and make friends:

[![Keybase](https://img.shields.io/badge/keybase-33A0FF?logo=keybase&logoColor=white&style=for-the-badge)](https://keybase.io/team/dreamnet)
[![Twitter](https://img.shields.io/twitter/follow/DreamNetCom?label=twitter&logo=twitter&logoColor=white&style=for-the-badge&labelColor=1DA1F2)](https://twitter.com/DreamNetCom)
[![Facebook](https://img.shields.io/badge/facebook-4172B8?logo=facebook&logoColor=white&style=for-the-badge)](https://web.facebook.com/groups/812542509140670)
We are a community interested in developing decentralized applications free of censorship. Join our social networks or repositories:

- [Website](https://dreamnet.tech)
- [GitHub](https://github.com/dreamnettech)
- [NotABug](https://notabug.org/DreamNet)
- [GitGud](https://gitgud.io/dreamnet)

## Support

Developing DreamNet applications is time consuming! Help us accelerate development and offer better updates!
We work every day to offer new features and improvements to the program for free, support us financially to offer more constant and large updates!

[![patreon](https://img.shields.io/badge/become%20a%20patron-fb6c54?logo=patreon&logoColor=white&style=for-the-badge)](https://www.patreon.com/dreampower)

## Source Code

This technology was going to arrive sooner or later and we want to keep it open and free for everyone. Help us in our goal of developing more applications with this technology.

[![GitHub stars](https://img.shields.io/github/stars/private-dreamnet/dreampower?logo=github&style=for-the-badge&labelColor=181717&label=Github)](https://github.com/private-dreamnet/dreampower)

[![DreamNet](https://img.shields.io/badge/dreamnet-E24329?logo=git&logoColor=white&style=for-the-badge)](https://git.dreamnet.tech/dreamnet/dreampower)

[![NotABug](https://img.shields.io/badge/notabug-black?logo=git&logoColor=white&style=for-the-badge)](https://notabug.org/DreamNet/dreampower)

[![GitGud](https://img.shields.io/badge/gitgud-F05032?logo=git&logoColor=white&style=for-the-badge)](https://gitgud.io/dreamnet/dreampower)

If you want to share or modify this software please do it for the same purpose as we do and always release the source code of your modifications. Read the [LICENSE](LICENSE) for more information.

# 💜 Binaries
# 🎉 Releases

## Requirements

- 64 bits OS
- Windows 7 SP1/Windows 8/Windows 10 1803+
- Ubuntu 16.04+
- macOS
- macOS Catalina 10.15+
- **8 GB** of RAM or more.

## GPU Processing Requirements
### GPU Processing

- NVIDIA Graphics card with minimum [3.5 CUDA compute capability](https://developer.nvidia.com/cuda-gpus)
- [Latest NVIDIA drivers](https://www.nvidia.com/Download/index.aspx)
- NVIDIA GPU with minimum [3.5 CUDA compute capability.](https://developer.nvidia.com/cuda-gpus)
- [Latest NVIDIA drivers.](https://www.nvidia.com/Download/index.aspx)

> 👉 If you do not have an NVIDIA or compatible graphics card you can use CPU processing.
> 👉 If you do not have an NVIDIA or compatible GPU you can use CPU processing.

## Download


[![GitHub All Releases](https://img.shields.io/github/downloads/private-dreamnet/dreampower/total?logo=github&logoColor=white&style=for-the-badge&labelColor=181717&color=blue)](https://github.com/private-dreamnet/dreampower/releases)
[![GitHub All Releases](https://img.shields.io/github/downloads/dreamnettech/dreampower/total?logo=github&logoColor=white&style=for-the-badge&labelColor=181717&color=blue)](https://github.com/dreamnettech/dreampower/releases)

## Installation

@@ -108,12 +96,11 @@ This will print out help on the parameters the algorithm accepts.

---

# 💻 Development > 🚧 Area only for developers!

> **If you are a developer:** Consider making a fork of the project and make PR of any improvement you can do, also join our server in [Keybase](https://keybase.io/team/dreamnet) where we have channels exclusively for development.
# 💻 Development

## Requirements

- [CUDA 10.0](https://developer.nvidia.com/cuda-10.0-download-archive)
- [Python 3.5+](https://www.python.org/downloads/)

## Prerequisite

BIN
assets/preview.png View File


+ 2
- 2
config.py View File

@@ -4,9 +4,9 @@
class Config:
"""Variables Configuration Class."""

version = "v1.2.2"
version = "v1.2.3"
checkpoints_version = "v0.0.1"
checkpoints_cdn = "https://cdn.dreamnet.tech/releases/checkpoints/{}.zip"
checkpoints_cdn = "https://catalina.dreamnet.tech/ipns/QmUvudWPzRa7hgDSVFiwzFzviAZJohTrvHJNhnvytuPv3H/Releases/Checkpoints/{}.zip"

# experiment specifics
norm = "batch" # instance normalization or batch normalization

+ 1
- 4
scripts/package.json View File

@@ -5,12 +5,9 @@
"private": true,
"devDependencies": {
"@octokit/rest": "^16.28.7",
"aws-sdk": "^2.517.0",
"deferred": "^0.7.11",
"jszip": "^3.2.2",
"lodash": "^4.17.15",
"mime-types": "^2.1.24",
"node-7z": "^1.1.1",
"tar": "^4.4.10"
"node-7z": "^1.1.1"
}
}

+ 29
- 83
scripts/release.js View File

@@ -1,16 +1,13 @@
/*
* DreamTime | (C) 2019 by Ivan Bravo Bravo <ivan@dreamnet.tech>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License 3.0 as published by
* the Free Software Foundation.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// DreamPower.
// Copyright (C) DreamNet. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License 3.0 as published by
// the Free Software Foundation. See <https://www.gnu.org/licenses/gpl-3.0.html>
//
// Written by Ivan Bravo Bravo <ivan@dreamnet.tech>, 2019.

const Octokit = require('@octokit/rest')
const AWS = require('aws-sdk')
const mime = require('mime-types')
const _ = require('lodash')
const Deferred = require('deferred')
@@ -18,11 +15,10 @@ const fs = require('fs')
const path = require('path')
const Seven = require('node-7z')

if (
!process.env.GITHUB_TOKEN ||
!process.env.S3_ACCESS_KEY_ID ||
!process.env.S3_SECRET_ACCESS_KEY
) {
const GITHUB_ORG = 'dreamnettech'
const GITHUB_REPO = 'dreamtime'

if (!process.env.GITHUB_TOKEN) {
console.log('API keys not found!')
process.exit(0)
}
@@ -31,24 +27,6 @@ const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN
})

const S3Client = new AWS.S3({
accessKeyId: process.env.S3_ACCESS_KEY_ID,
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
endpoint: 'https://sfo2.digitaloceanspaces.com'
})

function getOS() {
if (process.platform === 'win32') {
return 'windows'
}

if (process.platform === 'darwin') {
return 'macos'
}

return 'ubuntu'
}

const isTagRelease = _.startsWith(process.env.GITHUB_REF, 'refs/tags')

const tagName = isTagRelease
@@ -56,30 +34,19 @@ const tagName = isTagRelease
: _.truncate(process.env.GITHUB_SHA, { length: 7, omission: '' })

const version = tagName
const fileName = `DreamPower-${version}-${getOS()}-${
process.env.BUILD_DEVICE
}.7z`
const fileName = `DreamPower-${version}-${process.env.BUILD_OS}-${process.env.BUILD_PLATFORM}.7z`

const buildPath = path.resolve(__dirname, '../dist/dreampower')
const filePath = path.resolve(__dirname, '../', fileName)

/*
console.log({
tagName,
fileName,
buildPath,
filePath
})
*/

async function getGithubReleaseUrl() {
let response

try {
response = await octokit.repos.getReleaseByTag({
owner: 'private-dreamnet',
repo: 'dreampower',
tag: tagName
owner: GITHUB_ORG,
repo: GITHUB_REPO,
tag: tagName,
})
} catch (err) {
if (err.status !== 404) {
@@ -90,44 +57,25 @@ async function getGithubReleaseUrl() {

try {
response = await octokit.repos.createRelease({
owner: 'private-dreamnet',
repo: 'dreampower',
owner: GITHUB_ORG,
repo: GITHUB_REPO,
tag_name: tagName,
name: version,
prerelease: true,
draft: false
draft: false,
})
} catch (err) {
console.log(err)
throw err
console.warn(err)
console.log('Retrying...')

// eslint-disable-next-line no-return-await
return await getGithubReleaseUrl()
}
}

return response.data.upload_url
}

function uploadToS3(filePath, fileName) {
const deferred = new Deferred()

S3Client.upload(
{
Bucket: 'dreamnet-cdn',
Key: `releases/dreampower/${tagName}/${fileName}`,
Body: fs.createReadStream(filePath)
},
(err, response) => {
if (err) {
deferred.reject(err)
return
}

deferred.resolve(response)
}
)

return deferred.promise
}

async function uploadToGithub(filePath, fileName) {
const stats = fs.statSync(filePath)
const url = await getGithubReleaseUrl()
@@ -154,30 +102,28 @@ async function upload(filePath, fileName) {
console.log('Github say: ', response)
}

console.log(`Uploading ${fileName} to S3...`)
response = await uploadToS3(filePath, fileName)
console.log('S3 say:', response)
// TODO: Upload to DreamLink
}

function zip() {
console.log('Compressing build...')
process.chdir(buildPath)

const deferred = new Deferred()
const def = new Deferred()

const sevenProcess = Seven.add(filePath, '*', {
recursive: true
})

sevenProcess.on('error', (err) => {
deferred.reject(err)
def.reject(err)
})

sevenProcess.on('end', (info) => {
deferred.resolve()
def.resolve()
})

return deferred.promise
return def.promise
}

async function main() {

Loading…
Cancel
Save