Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation and launch in an Anaconda environment #428

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6d81fe4
Installation and launch in an Anaconda environment
My12123 Jul 24, 2023
c31a116
Update Installer for Windows CUDA.bat
My12123 Jul 24, 2023
54d819a
Update Installer for Windows CPU.bat
My12123 Jul 24, 2023
bd6ca3e
Update Open Prompt.bat
My12123 Jul 24, 2023
d1a11dd
Update Open Prompt.bat
My12123 Jul 24, 2023
9db3073
Update Open Prompt.bat
My12123 Jul 24, 2023
e6dc690
Update Installer for Windows CPU.bat
My12123 Jul 25, 2023
a74c668
Update Installer for Windows CUDA.bat
My12123 Jul 25, 2023
0c582ef
Merge branch 'zyddnys:main' into main
My12123 Jul 28, 2023
510cd96
Merge branch 'zyddnys:main' into main
My12123 Jul 31, 2023
bf815d1
Merge branch 'zyddnys:main' into main
My12123 Aug 1, 2023
4c4071d
Update README.md
My12123 Aug 1, 2023
712b09a
Merge branch 'zyddnys:main' into main
My12123 Aug 8, 2023
cc245d5
Merge branch 'zyddnys:main' into main
My12123 Aug 13, 2023
0af6ea3
Merge branch 'zyddnys:main' into main
My12123 Sep 8, 2023
8e4f47a
Update README_CN.md
My12123 Sep 8, 2023
51a7e1b
Merge branch 'zyddnys:main' into main
My12123 Sep 9, 2023
2f61708
Merge branch 'zyddnys:main' into main
My12123 Nov 14, 2023
d46c17b
Create bandit.yml
My12123 Nov 14, 2023
fedbccf
Merge branch 'zyddnys:main' into main
My12123 Nov 20, 2023
8b8d264
Update Installer for Windows CUDA.bat
My12123 Nov 20, 2023
ef4217b
Merge branch 'zyddnys:main' into main
My12123 Nov 20, 2023
142fee8
Merge branch 'zyddnys:main' into main
My12123 Nov 21, 2023
f715144
Create codeql.yml
My12123 Nov 21, 2023
cc5f46a
Update codeql.yml
My12123 Nov 21, 2023
2564903
Merge branch 'zyddnys:main' into main
My12123 Nov 28, 2023
1c2d724
Merge branch 'zyddnys:main' into main
My12123 Nov 29, 2023
fdf7eba
Merge branch 'main' into main
My12123 Dec 18, 2024
e107fbf
Update Installer for Windows CUDA.bat
My12123 Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Bandit is a security linter designed to find common security issues in Python code.
# This action will run Bandit on your codebase.
# The results of the scan will be found under the Security tab of your repository.

# https://github.com/marketplace/actions/bandit-scan is ISC licensed, by abirismyname
# https://pypi.org/project/bandit/ is Apache v2.0 licensed, by PyCQA

name: Bandit
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '34 15 * * 4'

jobs:
bandit:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Bandit Scan
uses: shundor/python-bandit-scan@9cc5aa4a006482b8a7f91134412df6772dbda22c
with: # optional arguments
# exit with 0, even with results found
exit_zero: true # optional, default is DEFAULT
# Github token of the repository (automatically created by Github)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information.
# File or directory to run bandit on
# path: # optional, default is .
# Report only issues of a given severity level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything)
# level: # optional, default is UNDEFINED
# Report only issues of a given confidence level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything)
# confidence: # optional, default is UNDEFINED
# comma-separated list of paths (glob patterns supported) to exclude from scan (note that these are in addition to the excluded paths provided in the config file) (default: .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg)
# excluded_paths: # optional, default is DEFAULT
# comma-separated list of test IDs to skip
# skips: # optional, default is DEFAULT
# path to a .bandit file that supplies command line arguments
# ini_path: # optional, default is DEFAULT

82 changes: 82 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '30 6 * * 2'

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
9 changes: 9 additions & 0 deletions Installer for Windows CPU.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@rem The disk where the anaconda is installed
@rem Change the path to the activate.bat file
F:
call F:\1\Scripts\activate.bat
conda create -n manga-image-translator python=3.10 -y
conda activate manga-image-translator
pip3 install torch torchvision torchaudio
pip install -r requirements.txt
conda install -c conda-forge pydensecrf -y
9 changes: 9 additions & 0 deletions Installer for Windows CUDA.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@rem The disk where the anaconda is installed
@rem Change the path to the activate.bat file
F:
call F:\1\Scripts\activate.bat
conda create -n manga-image-translator python=3.10 -y
conda activate manga-image-translator
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
pip install -r requirements.txt
conda install -c conda-forge pydensecrf -y
6 changes: 6 additions & 0 deletions Open Prompt.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@rem The disk where the anaconda is installed
@rem Change the path to the activate.bat file
F:
call F:\1\Scripts\activate.bat
call conda activate manga-image-translator
call cmd
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Please note that the samples may not always be updated, they may not represent t

## Online Demo

Official Demo (by zyddnys): <https://touhou.ai/imgtrans/>\
Official Demo (by zyddnys): <https://cotrans.touhou.ai/>
Browser Userscript (by QiroNT): <https://greasyfork.org/scripts/437569>

- Note this may not work sometimes due to stupid google gcp kept restarting my instance.
Expand Down
Loading