Code Monkey home page Code Monkey logo

shadowgenerator's Introduction

ShadowGenerator

AUTOMATIC1111版Stable Diffusion web UIと連携して、ほぼ全自動で線画から陰影をAIに描画させるツール 1

使い方

①AUTOMATIC1111版Stable Diffusion web UIのローカル環境を作る
https://github.com/AUTOMATIC1111/stable-diffusion-webui

②controlnetを導入する
https://github.com/Mikubill/sd-webui-controlnet
自分はSD2.1系モデルを使っているので、モデルは以下のcannyを使用。別に1.5系のlineArtとかでも動くと思います。
https://huggingface.co/thibaud/controlnet-sd21/tree/main

③config.yamlをテキストエディタで開いて編集
base_url: 基本弄らなくてよし
sd_model: 使っているStable Diffusionのモデルを指定
cn_model: 使っているControlNetのモデルを指定
base_prompt: デフォルトpromptを設定。基本弄らなくてよし
negative_prompt: ネガティブプロンプトを設定。『Mayng』等のembedding等を使う時は事前に導入しておくこと

④適当な場所にコマンドプロンプトから環境を構築

cd C:\
git clone https://github.com/tori29umai0123/ShadowGenerator/
cd C:\ShadowGenerator
python -m venv env
env\Scripts\activate.bat
pip install Pillow
pip install opencv-python
pip install numpy
python -m pip install "tensorflow<2.11"
pip install  keras
pip install huggingface-hub
pip install flask

④事前にStable Diffusionを起動しておき、web_server.batを実行。以下のURLをブラウザから開く
http://127.0.0.1:5000/

⑤ブラウザから各種設定して陰影生成
Image Upload:線画
Mask Upload:マスク画像。自動的に生成されるが気に入らなかったら手動でアップロードできる
Parse Prompt:prompt自動生成。手動で設定もできる。
Max Size:生成される画像サイズ
Shadow Generate:上記の設定が終わった後、クリックすると影が生成される

shadowgenerator's People

Contributors

tori29umai0123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.