@@ -25,11 +25,16 @@ git clone https://github.com/smthemex/ComfyUI_Stable_Makeup.git
|
||||
|
||||
2.requirements
|
||||
----
|
||||
按理是不需要装特别的库,因为内置了,如果还是库丢失,请单独安装。或者打开no need requirements.txt,查看缺失的库是否在里面。
|
||||
秋叶包因为是沙箱模式,所以把缺失的库安装在系统的python库里。
|
||||
官方的整合包,用pip install AAA --target="BBB/python_embeded/Lib/site-packages" AAA替换为缺失的库,BBB是本地路径。
|
||||
only insightface in requirements.txt
|
||||
|
||||
If the module is missing, please open "no need requirements.txt" , pip install missing module.
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
按理是不需要装特别的库,因为内置了,如果还是库丢失,请单独安装.
|
||||
便携包和秋叶包请注意使用python -m pip install
|
||||
|
||||
If the module is missing, please open "no need requirements.txt" , pip install or python -m pip install
|
||||
missing module.
|
||||
|
||||
3 Need model
|
||||
----
|
||||
@@ -49,7 +54,8 @@ The download address for the model is quite miscellaneous, so please download it
|
||||
3.4 clip模型,外置为输入格式,可以引导至本地其他路径。
|
||||
"openai/clip-vit-large-patch14" clip models
|
||||
|
||||
3.5 SD1.5 “v1-5-pruned-emaonly.safetensors” [link](https://huggingface.co/runwayml/stable-diffusion-v1-5)
|
||||
3.5 SD1.5
|
||||
any sd1.5 weights,
|
||||
|
||||
Models list
|
||||
-----
|
||||
@@ -62,10 +68,10 @@ Models list
|
||||
| ├── pytorch_model_2.bin
|
||||
| ├── spiga_300wpublic.pt
|
||||
| ├── resnet50.pth
|
||||
| ├──checkpoints
|
||||
| ├── v1-5-pruned-emaonly.safetensors
|
||||
├── ComfyUI/models/checkpoints
|
||||
| ├── any sd1.5 weights,
|
||||
```
|
||||
首次使用需要下载“runwayml/stable-diffusion-v1-5”的配套config文件,及openai/clip-vit-large-patch14
|
||||
首次使用需要下载openai/clip-vit-large-patch14
|
||||
|
||||
|
||||
Example
|
||||
|
||||
@@ -1,229 +0,0 @@
|
||||
accelerate==0.23.0
|
||||
addict==2.4.0
|
||||
aiofiles==23.2.1
|
||||
aiohttp==3.8.6
|
||||
aiosignal==1.3.1
|
||||
albumentations==1.3.1
|
||||
altair==5.2.0
|
||||
annotated-types==0.6.0
|
||||
antlr4-python3-runtime==4.9.3
|
||||
anyio==4.2.0
|
||||
appdirs==1.4.4
|
||||
asgiref==3.7.2
|
||||
asttokens==2.4.1
|
||||
async-timeout==4.0.3
|
||||
attrs==23.1.0
|
||||
av==11.0.0
|
||||
boto3==1.29.5
|
||||
botocore==1.32.5
|
||||
cairocffi==1.6.1
|
||||
CairoSVG==2.7.1
|
||||
certifi==2023.7.22
|
||||
cffi==1.16.0
|
||||
chardet==4.0.0
|
||||
charset-normalizer==3.3.0
|
||||
click==8.1.7
|
||||
cmake==3.27.6
|
||||
coloredlogs==15.0.1
|
||||
comm==0.2.0
|
||||
contourpy==1.1.1
|
||||
cssselect2==0.7.0
|
||||
cssutils==2.9.0
|
||||
cycler==0.10.0
|
||||
Cython==3.0.8
|
||||
datasets==2.14.6
|
||||
decorator==5.1.1
|
||||
defusedxml==0.7.1
|
||||
Deprecated==1.2.14
|
||||
diffusers==0.25.1
|
||||
diffvg==0.0.1
|
||||
dill==0.3.7
|
||||
Django==4.2.7
|
||||
dlib==19.24.2
|
||||
dnspython==2.4.2
|
||||
docker-pycreds==0.4.0
|
||||
docopt==0.6.2
|
||||
easydict==1.11
|
||||
einops==0.7.0
|
||||
ete3==3.1.3
|
||||
exceptiongroup==1.2.0
|
||||
executing==2.0.1
|
||||
facelib @ git+https://github.com/sajjjadayobi/FaceLib.git@382841efec823f059f49754e5d378abb12cfb551
|
||||
fastapi==0.109.0
|
||||
ffmpy==0.3.1
|
||||
filelock==3.12.4
|
||||
flatbuffers==23.5.26
|
||||
fonttools==4.43.1
|
||||
frozenlist==1.4.0
|
||||
fsspec==2023.9.2
|
||||
fvcore==0.1.5.post20221221
|
||||
gitdb==4.0.10
|
||||
GitPython==3.1.37
|
||||
gradio==3.27.0
|
||||
gradio_client==0.8.0
|
||||
greenlet==3.0.1
|
||||
-e git+https://github.com/IDEA-Research/GroundingDINO.git@57535c5a79791cb76e36fdb64975271354f10251#egg=groundingdino
|
||||
h11==0.14.0
|
||||
hjson==3.1.0
|
||||
httpcore==1.0.2
|
||||
httpx==0.26.0
|
||||
huggingface-hub==0.17.3
|
||||
humanfriendly==10.0
|
||||
idna==2.10
|
||||
imagecorruptions==1.1.2
|
||||
imageio==2.31.5
|
||||
imageio-ffmpeg==0.4.9
|
||||
imgaug==0.4.0
|
||||
importlib-metadata==6.8.0
|
||||
insightface==0.7.3
|
||||
iopath==0.1.10
|
||||
ipdb==0.13.13
|
||||
ipython==8.17.2
|
||||
ipywidgets==8.1.1
|
||||
jedi==0.19.1
|
||||
Jinja2==3.1.2
|
||||
jmespath==1.0.1
|
||||
jmspath==0.0.1
|
||||
joblib==1.3.2
|
||||
jsonpatch==1.33
|
||||
jsonpointer==2.4
|
||||
jsonschema==4.20.0
|
||||
jsonschema-specifications==2023.12.1
|
||||
jupyterlab-widgets==3.0.9
|
||||
kiwisolver==1.4.5
|
||||
lazy_loader==0.3
|
||||
lightning-utilities==0.9.0
|
||||
linkify-it-py==2.0.2
|
||||
lit==17.0.2
|
||||
llvmlite==0.41.1
|
||||
markdown-it-py==2.2.0
|
||||
MarkupSafe==2.1.3
|
||||
matplotlib==3.8.0
|
||||
matplotlib-inline==0.1.6
|
||||
mdit-py-plugins==0.3.3
|
||||
mdurl==0.1.2
|
||||
moviepy==1.0.3
|
||||
mpmath==1.3.0
|
||||
multidict==6.0.4
|
||||
multiprocess==0.70.15
|
||||
networkx==3.1
|
||||
ninja==1.11.1.1
|
||||
numba==0.58.1
|
||||
numpy==1.26.0
|
||||
nvidia-cublas-cu11==11.10.3.66
|
||||
nvidia-cuda-cupti-cu11==11.7.101
|
||||
nvidia-cuda-nvrtc-cu11==11.7.99
|
||||
nvidia-cuda-runtime-cu11==11.7.99
|
||||
nvidia-cudnn-cu11==8.5.0.96
|
||||
nvidia-cufft-cu11==10.9.0.58
|
||||
nvidia-curand-cu11==10.2.10.91
|
||||
nvidia-cusolver-cu11==11.4.0.1
|
||||
nvidia-cusparse-cu11==11.7.4.91
|
||||
nvidia-nccl-cu11==2.14.3
|
||||
nvidia-nvtx-cu11==11.7.91
|
||||
omegaconf==2.3.0
|
||||
onnx==1.15.0
|
||||
onnxruntime==1.16.3
|
||||
opencv-python==4.8.1.78
|
||||
opencv-python-headless==4.8.0.74
|
||||
orderedset==2.0.3
|
||||
orjson==3.9.10
|
||||
packaging==23.2
|
||||
pandas==2.1.1
|
||||
parso==0.8.3
|
||||
pathtools==0.1.2
|
||||
pexpect==4.8.0
|
||||
Pillow==10.0.1
|
||||
platformdirs==4.1.0
|
||||
portalocker==2.8.2
|
||||
prettytable==3.9.0
|
||||
proglog==0.1.10
|
||||
progressbar==2.5
|
||||
prompt-toolkit==3.0.39
|
||||
protobuf==4.24.3
|
||||
psutil==5.9.5
|
||||
ptyprocess==0.7.0
|
||||
pure-eval==0.2.2
|
||||
pyaml==23.9.7
|
||||
pyarrow==14.0.0
|
||||
pycocotools==2.0.7
|
||||
pycparser==2.21
|
||||
pydantic==2.5.3
|
||||
pydantic_core==2.14.6
|
||||
pydub==0.25.1
|
||||
Pygments==2.17.2
|
||||
pymongo==4.6.0
|
||||
pyparsing==2.4.7
|
||||
python-dateutil==2.8.2
|
||||
python-dotenv==1.0.0
|
||||
python-magic==0.4.27
|
||||
python-multipart==0.0.6
|
||||
pytorch-lightning==2.1.1
|
||||
pytz==2023.3.post1
|
||||
PyYAML==6.0.1
|
||||
qudida==0.0.4
|
||||
referencing==0.32.1
|
||||
regex==2023.10.3
|
||||
requests==2.31.0
|
||||
requests-toolbelt==1.0.0
|
||||
roboflow==1.1.12
|
||||
rpds-py==0.17.1
|
||||
s3transfer==0.7.0
|
||||
safetensors==0.3.3
|
||||
scikit-image==0.22.0
|
||||
scikit-learn==1.4.0
|
||||
scipy==1.11.3
|
||||
seaborn==0.13.0
|
||||
segment-anything @ git+https://github.com/facebookresearch/segment-anything.git@6fdee8f2727f4506cfbbe553e23b895e27956588
|
||||
semantic-version==2.10.0
|
||||
sentry-sdk==1.31.0
|
||||
setproctitle==1.3.3
|
||||
shapely==2.0.2
|
||||
simplejson==3.19.2
|
||||
six==1.16.0
|
||||
smmap==5.0.1
|
||||
sniffio==1.3.0
|
||||
SQLAlchemy==2.0.22
|
||||
sqlparse==0.4.4
|
||||
stack-data==0.6.3
|
||||
starlette==0.35.1
|
||||
supervision==0.6.0
|
||||
svgpathtools==1.6.1
|
||||
svgwrite==1.4.3
|
||||
sympy==1.12
|
||||
tabulate==0.9.0
|
||||
termcolor==2.4.0
|
||||
threadpoolctl==3.2.0
|
||||
tifffile==2023.9.26
|
||||
timm==0.9.12
|
||||
tinycss2==1.2.1
|
||||
tokenizers==0.14.0
|
||||
tomli==2.0.1
|
||||
toolz==0.12.0
|
||||
torch==2.0.1
|
||||
torch-tools==0.1.5
|
||||
torchmetrics==1.2.0
|
||||
torchsummary==1.5.1
|
||||
torchvision==0.15.2
|
||||
tornado==6.3.3
|
||||
tqdm==4.66.1
|
||||
traitlets==5.13.0
|
||||
transformers==4.34.0
|
||||
triton==2.0.0
|
||||
typing_extensions==4.8.0
|
||||
tzdata==2023.3
|
||||
uc-micro-py==1.0.2
|
||||
urllib3==2.0.6
|
||||
uvicorn==0.25.0
|
||||
visdom==0.2.4
|
||||
wandb==0.15.11
|
||||
wcwidth==0.2.12
|
||||
webencodings==0.5.1
|
||||
websocket-client==1.6.4
|
||||
websockets==11.0.3
|
||||
widgetsnbextension==4.0.9
|
||||
xxhash==3.4.1
|
||||
yacs==0.1.8
|
||||
yapf==0.40.2
|
||||
yarl==1.9.2
|
||||
zipp==3.17.0
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui_stable_makeup"
|
||||
description = ""
|
||||
version = "1.0.0"
|
||||
description = "you can using stable makeup in comfyUI"
|
||||
version = "1.0.1"
|
||||
license = { file = "LICENSE" }
|
||||
|
||||
[project.urls]
|
||||
@@ -9,6 +9,6 @@ Repository = "https://github.com/smthemex/ComfyUI_Stable_Makeup"
|
||||
# Used by Comfy Registry https://comfyregistry.org
|
||||
|
||||
[tool.comfy]
|
||||
PublisherId = "smthemx"
|
||||
PublisherId = "smthemex"
|
||||
DisplayName = "ComfyUI_Stable_Makeup"
|
||||
Icon = ""
|
||||
|
||||
@@ -0,0 +1,227 @@
|
||||
insightface
|
||||
#accelerate==0.23.0
|
||||
#addict==2.4.0
|
||||
#aiofiles==23.2.1
|
||||
#aiohttp==3.8.6
|
||||
#aiosignal==1.3.1
|
||||
#albumentations==1.3.1
|
||||
#altair==5.2.0
|
||||
#annotated-types==0.6.0
|
||||
#antlr4-python3-runtime==4.9.3
|
||||
#anyio==4.2.0
|
||||
#appdirs==1.4.4
|
||||
#asgiref==3.7.2
|
||||
#asttokens==2.4.1
|
||||
#async-timeout==4.0.3
|
||||
#attrs==23.1.0
|
||||
#av==11.0.0
|
||||
#boto3==1.29.5
|
||||
#botocore==1.32.5
|
||||
#cairocffi==1.6.1
|
||||
#CairoSVG==2.7.1
|
||||
#certifi==2023.7.22
|
||||
#cffi==1.16.0
|
||||
#chardet==4.0.0
|
||||
#charset-normalizer==3.3.0
|
||||
#click==8.1.7
|
||||
#cmake==3.27.6
|
||||
#coloredlogs==15.0.1
|
||||
#comm==0.2.0
|
||||
#contourpy==1.1.1
|
||||
#cssselect2==0.7.0
|
||||
#cssutils==2.9.0
|
||||
#cycler==0.10.0
|
||||
#Cython==3.0.8
|
||||
#datasets==2.14.6
|
||||
#decorator==5.1.1
|
||||
#defusedxml==0.7.1
|
||||
#Deprecated==1.2.14
|
||||
#diffusers==0.25.1
|
||||
#diffvg==0.0.1
|
||||
#dill==0.3.7
|
||||
#Django==4.2.7
|
||||
#dlib==19.24.2
|
||||
#dnspython==2.4.2
|
||||
#docker-pycreds==0.4.0
|
||||
#docopt==0.6.2
|
||||
#easydict==1.11
|
||||
#einops==0.7.0
|
||||
#ete3==3.1.3
|
||||
#exceptiongroup==1.2.0
|
||||
#executing==2.0.1
|
||||
#facelib @ git+https://github.com/sajjjadayobi/FaceLib.git@382841efec823f059f49754e5d378abb12cfb551
|
||||
#fastapi==0.109.0
|
||||
#ffmpy==0.3.1
|
||||
#filelock==3.12.4
|
||||
#flatbuffers==23.5.26
|
||||
#fonttools==4.43.1
|
||||
#frozenlist==1.4.0
|
||||
#fsspec==2023.9.2
|
||||
#fvcore==0.1.5.post20221221
|
||||
#gitdb==4.0.10
|
||||
#GitPython==3.1.37
|
||||
#greenlet==3.0.1
|
||||
#-e git+https://github.com/IDEA-Research/GroundingDINO.git@57535c5a79791cb76e36fdb64975271354f10251#egg=groundingdino
|
||||
#h11==0.14.0
|
||||
#hjson==3.1.0
|
||||
#httpcore==1.0.2
|
||||
#httpx==0.26.0
|
||||
#huggingface-hub==0.17.3
|
||||
#humanfriendly==10.0
|
||||
#idna==2.10
|
||||
#imagecorruptions==1.1.2
|
||||
#imageio==2.31.5
|
||||
#imageio-ffmpeg==0.4.9
|
||||
#imgaug==0.4.0
|
||||
#importlib-metadata==6.8.0
|
||||
#iopath==0.1.10
|
||||
#ipdb==0.13.13
|
||||
#ipython==8.17.2
|
||||
#ipywidgets==8.1.1
|
||||
#jedi==0.19.1
|
||||
#Jinja2==3.1.2
|
||||
#jmespath==1.0.1
|
||||
#jmspath==0.0.1
|
||||
#joblib==1.3.2
|
||||
#jsonpatch==1.33
|
||||
#jsonpointer==2.4
|
||||
#jsonschema==4.20.0
|
||||
#jsonschema-specifications==2023.12.1
|
||||
#jupyterlab-widgets==3.0.9
|
||||
#kiwisolver==1.4.5
|
||||
#lazy_loader==0.3
|
||||
#lightning-utilities==0.9.0
|
||||
#linkify-it-py==2.0.2
|
||||
#lit==17.0.2
|
||||
#llvmlite==0.41.1
|
||||
#markdown-it-py==2.2.0
|
||||
#MarkupSafe==2.1.3
|
||||
#matplotlib==3.8.0
|
||||
#matplotlib-inline==0.1.6
|
||||
#mdit-py-plugins==0.3.3
|
||||
#mdurl==0.1.2
|
||||
#moviepy==1.0.3
|
||||
#mpmath==1.3.0
|
||||
#multidict==6.0.4
|
||||
#multiprocess==0.70.15
|
||||
#networkx==3.1
|
||||
#ninja==1.11.1.1
|
||||
#numba==0.58.1
|
||||
#numpy==1.26.0
|
||||
#nvidia-cublas-cu11==11.10.3.66
|
||||
#nvidia-cuda-cupti-cu11==11.7.101
|
||||
#nvidia-cuda-nvrtc-cu11==11.7.99
|
||||
#nvidia-cuda-runtime-cu11==11.7.99
|
||||
#nvidia-cudnn-cu11==8.5.0.96
|
||||
#nvidia-cufft-cu11==10.9.0.58
|
||||
#nvidia-curand-cu11==10.2.10.91
|
||||
#nvidia-cusolver-cu11==11.4.0.1
|
||||
#nvidia-cusparse-cu11==11.7.4.91
|
||||
#nvidia-nccl-cu11==2.14.3
|
||||
#nvidia-nvtx-cu11==11.7.91
|
||||
#omegaconf==2.3.0
|
||||
#onnx==1.15.0
|
||||
#onnxruntime==1.16.3
|
||||
#opencv-python==4.8.1.78
|
||||
#opencv-python-headless==4.8.0.74
|
||||
#orderedset==2.0.3
|
||||
#orjson==3.9.10
|
||||
#packaging==23.2
|
||||
#pandas==2.1.1
|
||||
#parso==0.8.3
|
||||
#pathtools==0.1.2
|
||||
#pexpect==4.8.0
|
||||
#Pillow==10.0.1
|
||||
#platformdirs==4.1.0
|
||||
#portalocker==2.8.2
|
||||
#prettytable==3.9.0
|
||||
#proglog==0.1.10
|
||||
#progressbar==2.5
|
||||
#prompt-toolkit==3.0.39
|
||||
#protobuf==4.24.3
|
||||
#psutil==5.9.5
|
||||
#ptyprocess==0.7.0
|
||||
#pure-eval==0.2.2
|
||||
#pyaml==23.9.7
|
||||
#pyarrow==14.0.0
|
||||
#pycocotools==2.0.7
|
||||
#pycparser==2.21
|
||||
#pydantic==2.5.3
|
||||
#pydantic_core==2.14.6
|
||||
#pydub==0.25.1
|
||||
#Pygments==2.17.2
|
||||
#pymongo==4.6.0
|
||||
#pyparsing==2.4.7
|
||||
#python-dateutil==2.8.2
|
||||
#python-dotenv==1.0.0
|
||||
#python-magic==0.4.27
|
||||
#python-multipart==0.0.6
|
||||
#pytorch-lightning==2.1.1
|
||||
#pytz==2023.3.post1
|
||||
#PyYAML==6.0.1
|
||||
#qudida==0.0.4
|
||||
#referencing==0.32.1
|
||||
#regex==2023.10.3
|
||||
#requests==2.31.0
|
||||
#requests-toolbelt==1.0.0
|
||||
#roboflow==1.1.12
|
||||
#rpds-py==0.17.1
|
||||
#s3transfer==0.7.0
|
||||
#safetensors==0.3.3
|
||||
#scikit-image==0.22.0
|
||||
#scikit-learn==1.4.0
|
||||
#scipy==1.11.3
|
||||
#seaborn==0.13.0
|
||||
#segment-anything @ git+https://github.com/facebookresearch/segment-anything.git@6fdee8f2727f4506cfbbe553e23b895e27956588
|
||||
#semantic-version==2.10.0
|
||||
#sentry-sdk==1.31.0
|
||||
#setproctitle==1.3.3
|
||||
#shapely==2.0.2
|
||||
#simplejson==3.19.2
|
||||
#six==1.16.0
|
||||
#smmap==5.0.1
|
||||
#sniffio==1.3.0
|
||||
#SQLAlchemy==2.0.22
|
||||
#sqlparse==0.4.4
|
||||
#stack-data==0.6.3
|
||||
#starlette==0.35.1
|
||||
#supervision==0.6.0
|
||||
#svgpathtools==1.6.1
|
||||
#svgwrite==1.4.3
|
||||
#sympy==1.12
|
||||
#tabulate==0.9.0
|
||||
#termcolor==2.4.0
|
||||
#threadpoolctl==3.2.0
|
||||
#tifffile==2023.9.26
|
||||
#timm==0.9.12
|
||||
#tinycss2==1.2.1
|
||||
#tokenizers==0.14.0
|
||||
#tomli==2.0.1
|
||||
#toolz==0.12.0
|
||||
#torch==2.0.1
|
||||
#torch-tools==0.1.5
|
||||
#torchmetrics==1.2.0
|
||||
#torchsummary==1.5.1
|
||||
#torchvision==0.15.2
|
||||
#tornado==6.3.3
|
||||
#tqdm==4.66.1
|
||||
#traitlets==5.13.0
|
||||
#transformers==4.34.0
|
||||
#triton==2.0.0
|
||||
#typing_extensions==4.8.0
|
||||
#tzdata==2023.3
|
||||
#uc-micro-py==1.0.2
|
||||
#urllib3==2.0.6
|
||||
#uvicorn==0.25.0
|
||||
#visdom==0.2.4
|
||||
#wandb==0.15.11
|
||||
#wcwidth==0.2.12
|
||||
#webencodings==0.5.1
|
||||
#websocket-client==1.6.4
|
||||
#websockets==11.0.3
|
||||
#widgetsnbextension==4.0.9
|
||||
#xxhash==3.4.1
|
||||
#yacs==0.1.8
|
||||
#yapf==0.40.2
|
||||
#yarl==1.9.2
|
||||
#zipp==3.17.0
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"crop_size": {
|
||||
"height": 224,
|
||||
"width": 224
|
||||
},
|
||||
"do_center_crop": true,
|
||||
"do_convert_rgb": true,
|
||||
"do_normalize": true,
|
||||
"do_rescale": true,
|
||||
"do_resize": true,
|
||||
"feature_extractor_type": "CLIPFeatureExtractor",
|
||||
"image_mean": [
|
||||
0.48145466,
|
||||
0.4578275,
|
||||
0.40821073
|
||||
],
|
||||
"image_processor_type": "CLIPFeatureExtractor",
|
||||
"image_std": [
|
||||
0.26862954,
|
||||
0.26130258,
|
||||
0.27577711
|
||||
],
|
||||
"resample": 3,
|
||||
"rescale_factor": 0.00392156862745098,
|
||||
"size": {
|
||||
"shortest_edge": 224
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"_class_name": "StableDiffusionPipeline",
|
||||
"_diffusers_version": "0.21.0.dev0",
|
||||
"_name_or_path": "lykon-models/dreamshaper-8",
|
||||
"feature_extractor": [
|
||||
"transformers",
|
||||
"CLIPFeatureExtractor"
|
||||
],
|
||||
"requires_safety_checker": true,
|
||||
"safety_checker": [
|
||||
"stable_diffusion",
|
||||
"StableDiffusionSafetyChecker"
|
||||
],
|
||||
"scheduler": [
|
||||
"diffusers",
|
||||
"DEISMultistepScheduler"
|
||||
],
|
||||
"text_encoder": [
|
||||
"transformers",
|
||||
"CLIPTextModel"
|
||||
],
|
||||
"tokenizer": [
|
||||
"transformers",
|
||||
"CLIPTokenizer"
|
||||
],
|
||||
"unet": [
|
||||
"diffusers",
|
||||
"UNet2DConditionModel"
|
||||
],
|
||||
"vae": [
|
||||
"diffusers",
|
||||
"AutoencoderKL"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"_name_or_path": "/home/patrick/.cache/huggingface/hub/models--lykon-models--dreamshaper-8/snapshots/7e855e3f481832419503d1fa18d4a4379597f04b/safety_checker",
|
||||
"architectures": [
|
||||
"StableDiffusionSafetyChecker"
|
||||
],
|
||||
"initializer_factor": 1.0,
|
||||
"logit_scale_init_value": 2.6592,
|
||||
"model_type": "clip",
|
||||
"projection_dim": 768,
|
||||
"text_config": {
|
||||
"dropout": 0.0,
|
||||
"hidden_size": 768,
|
||||
"intermediate_size": 3072,
|
||||
"model_type": "clip_text_model",
|
||||
"num_attention_heads": 12
|
||||
},
|
||||
"torch_dtype": "float16",
|
||||
"transformers_version": "4.33.0.dev0",
|
||||
"vision_config": {
|
||||
"dropout": 0.0,
|
||||
"hidden_size": 1024,
|
||||
"intermediate_size": 4096,
|
||||
"model_type": "clip_vision_model",
|
||||
"num_attention_heads": 16,
|
||||
"num_hidden_layers": 24,
|
||||
"patch_size": 14
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"_class_name": "DEISMultistepScheduler",
|
||||
"_diffusers_version": "0.21.0.dev0",
|
||||
"algorithm_type": "deis",
|
||||
"beta_end": 0.012,
|
||||
"beta_schedule": "scaled_linear",
|
||||
"beta_start": 0.00085,
|
||||
"clip_sample": false,
|
||||
"dynamic_thresholding_ratio": 0.995,
|
||||
"lower_order_final": true,
|
||||
"num_train_timesteps": 1000,
|
||||
"prediction_type": "epsilon",
|
||||
"sample_max_value": 1.0,
|
||||
"set_alpha_to_one": false,
|
||||
"skip_prk_steps": true,
|
||||
"solver_order": 2,
|
||||
"solver_type": "logrho",
|
||||
"steps_offset": 1,
|
||||
"thresholding": false,
|
||||
"timestep_spacing": "leading",
|
||||
"trained_betas": null,
|
||||
"use_karras_sigmas": false
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"_name_or_path": "/home/patrick/.cache/huggingface/hub/models--lykon-models--dreamshaper-8/snapshots/7e855e3f481832419503d1fa18d4a4379597f04b/text_encoder",
|
||||
"architectures": [
|
||||
"CLIPTextModel"
|
||||
],
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 0,
|
||||
"dropout": 0.0,
|
||||
"eos_token_id": 2,
|
||||
"hidden_act": "quick_gelu",
|
||||
"hidden_size": 768,
|
||||
"initializer_factor": 1.0,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 3072,
|
||||
"layer_norm_eps": 1e-05,
|
||||
"max_position_embeddings": 77,
|
||||
"model_type": "clip_text_model",
|
||||
"num_attention_heads": 12,
|
||||
"num_hidden_layers": 12,
|
||||
"pad_token_id": 1,
|
||||
"projection_dim": 768,
|
||||
"torch_dtype": "float16",
|
||||
"transformers_version": "4.33.0.dev0",
|
||||
"vocab_size": 49408
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"bos_token": {
|
||||
"content": "<|startoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": "<|endoftext|>",
|
||||
"unk_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"bos_token": {
|
||||
"__type": "AddedToken",
|
||||
"content": "<|startoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"clean_up_tokenization_spaces": true,
|
||||
"do_lower_case": true,
|
||||
"eos_token": {
|
||||
"__type": "AddedToken",
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"errors": "replace",
|
||||
"model_max_length": 77,
|
||||
"pad_token": "<|endoftext|>",
|
||||
"tokenizer_class": "CLIPTokenizer",
|
||||
"unk_token": {
|
||||
"__type": "AddedToken",
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"_class_name": "UNet2DConditionModel",
|
||||
"_diffusers_version": "0.21.0.dev0",
|
||||
"_name_or_path": "/home/patrick/.cache/huggingface/hub/models--lykon-models--dreamshaper-8/snapshots/7e855e3f481832419503d1fa18d4a4379597f04b/unet",
|
||||
"act_fn": "silu",
|
||||
"addition_embed_type": null,
|
||||
"addition_embed_type_num_heads": 64,
|
||||
"addition_time_embed_dim": null,
|
||||
"attention_head_dim": 8,
|
||||
"attention_type": "default",
|
||||
"block_out_channels": [
|
||||
320,
|
||||
640,
|
||||
1280,
|
||||
1280
|
||||
],
|
||||
"center_input_sample": false,
|
||||
"class_embed_type": null,
|
||||
"class_embeddings_concat": false,
|
||||
"conv_in_kernel": 3,
|
||||
"conv_out_kernel": 3,
|
||||
"cross_attention_dim": 768,
|
||||
"cross_attention_norm": null,
|
||||
"down_block_types": [
|
||||
"CrossAttnDownBlock2D",
|
||||
"CrossAttnDownBlock2D",
|
||||
"CrossAttnDownBlock2D",
|
||||
"DownBlock2D"
|
||||
],
|
||||
"downsample_padding": 1,
|
||||
"dual_cross_attention": false,
|
||||
"encoder_hid_dim": null,
|
||||
"encoder_hid_dim_type": null,
|
||||
"flip_sin_to_cos": true,
|
||||
"freq_shift": 0,
|
||||
"in_channels": 4,
|
||||
"layers_per_block": 2,
|
||||
"mid_block_only_cross_attention": null,
|
||||
"mid_block_scale_factor": 1,
|
||||
"mid_block_type": "UNetMidBlock2DCrossAttn",
|
||||
"norm_eps": 1e-05,
|
||||
"norm_num_groups": 32,
|
||||
"num_attention_heads": null,
|
||||
"num_class_embeds": null,
|
||||
"only_cross_attention": false,
|
||||
"out_channels": 4,
|
||||
"projection_class_embeddings_input_dim": null,
|
||||
"resnet_out_scale_factor": 1.0,
|
||||
"resnet_skip_time_act": false,
|
||||
"resnet_time_scale_shift": "default",
|
||||
"sample_size": 64,
|
||||
"time_cond_proj_dim": null,
|
||||
"time_embedding_act_fn": null,
|
||||
"time_embedding_dim": null,
|
||||
"time_embedding_type": "positional",
|
||||
"timestep_post_act": null,
|
||||
"transformer_layers_per_block": 1,
|
||||
"up_block_types": [
|
||||
"UpBlock2D",
|
||||
"CrossAttnUpBlock2D",
|
||||
"CrossAttnUpBlock2D",
|
||||
"CrossAttnUpBlock2D"
|
||||
],
|
||||
"upcast_attention": null,
|
||||
"use_linear_projection": false
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"_class_name": "AutoencoderKL",
|
||||
"_diffusers_version": "0.21.0.dev0",
|
||||
"_name_or_path": "/home/patrick/.cache/huggingface/hub/models--lykon-models--dreamshaper-8/snapshots/7e855e3f481832419503d1fa18d4a4379597f04b/vae",
|
||||
"act_fn": "silu",
|
||||
"block_out_channels": [
|
||||
128,
|
||||
256,
|
||||
512,
|
||||
512
|
||||
],
|
||||
"down_block_types": [
|
||||
"DownEncoderBlock2D",
|
||||
"DownEncoderBlock2D",
|
||||
"DownEncoderBlock2D",
|
||||
"DownEncoderBlock2D"
|
||||
],
|
||||
"force_upcast": true,
|
||||
"in_channels": 3,
|
||||
"latent_channels": 4,
|
||||
"layers_per_block": 2,
|
||||
"norm_num_groups": 32,
|
||||
"out_channels": 3,
|
||||
"sample_size": 512,
|
||||
"scaling_factor": 0.18215,
|
||||
"up_block_types": [
|
||||
"UpDecoderBlock2D",
|
||||
"UpDecoderBlock2D",
|
||||
"UpDecoderBlock2D",
|
||||
"UpDecoderBlock2D"
|
||||
]
|
||||
}
|
||||
+2
-44
@@ -4,10 +4,7 @@
|
||||
import folder_paths
|
||||
import os
|
||||
import torch
|
||||
#from diffusers import UNet2DConditionModel as OriginalUNet2DConditionModel
|
||||
import diffusers
|
||||
from transformers import CLIPTextModel
|
||||
|
||||
dif_version = str(diffusers.__version__)
|
||||
dif_version_int = int(dif_version.split(".")[1])
|
||||
|
||||
@@ -24,12 +21,8 @@ from PIL import Image
|
||||
from .facelib import FaceDetector
|
||||
from comfy.utils import common_upscale
|
||||
import numpy as np
|
||||
import sys
|
||||
|
||||
makeup_current_path = os.path.dirname(os.path.abspath(__file__))
|
||||
node_path_dir = os.path.dirname(makeup_current_path)
|
||||
comfy_file_path = os.path.dirname(node_path_dir)
|
||||
|
||||
weigths_current_path = os.path.join(folder_paths.models_dir, "stable_makeup")
|
||||
|
||||
if not os.path.exists(weigths_current_path):
|
||||
@@ -98,19 +91,6 @@ def get_sheduler(name):
|
||||
scheduler = UniPCMultistepScheduler()
|
||||
return scheduler
|
||||
|
||||
paths = []
|
||||
for search_path in folder_paths.get_folder_paths("diffusers"):
|
||||
if os.path.exists(search_path):
|
||||
for root, subdir, files in os.walk(search_path, followlinks=True):
|
||||
if "model_index.json" in files:
|
||||
paths.append(os.path.relpath(root, start=search_path))
|
||||
|
||||
if paths:
|
||||
paths = ["none"] + [x for x in paths if x]
|
||||
else:
|
||||
paths = ["none", ]
|
||||
|
||||
|
||||
def tensor_to_pil(tensor):
|
||||
image_np = tensor.squeeze().mul(255).clamp(0, 255).byte().numpy()
|
||||
image = Image.fromarray(image_np, mode='RGB')
|
||||
@@ -127,28 +107,6 @@ def nomarl_upscale(img_tensor, width, height):
|
||||
img_pil = tensor_to_pil(samples)
|
||||
return img_pil
|
||||
|
||||
def get_local_path(comfy_file_path, model_path):
|
||||
path = os.path.join(comfy_file_path, "models", "diffusers", model_path)
|
||||
model_path = os.path.normpath(path)
|
||||
if sys.platform == 'win32':
|
||||
model_path = model_path.replace('\\', "/")
|
||||
return model_path
|
||||
|
||||
def get_instance_path(path):
|
||||
instance_path = os.path.normpath(path)
|
||||
if sys.platform == 'win32':
|
||||
instance_path = instance_path.replace('\\', "/")
|
||||
return instance_path
|
||||
|
||||
def instance_path(path, repo):
|
||||
if repo == "":
|
||||
if path == "none":
|
||||
repo = "none"
|
||||
else:
|
||||
model_path = get_local_path(comfy_file_path, path)
|
||||
repo = get_instance_path(model_path)
|
||||
return repo
|
||||
|
||||
|
||||
class StableMakeup_LoadModel:
|
||||
def __init__(self):
|
||||
@@ -176,7 +134,7 @@ class StableMakeup_LoadModel:
|
||||
id_encoder_path = os.path.join(weigths_current_path,"pytorch_model_1.bin")
|
||||
pose_encoder_path = os.path.join(weigths_current_path,"pytorch_model_2.bin")
|
||||
original_config_file=os.path.join(folder_paths.models_dir,"configs","v1-inference.yaml")
|
||||
sd15_config="Lykon/dreamshaper-8"
|
||||
sd15_config=os.path.join(makeup_current_path,"sd15_config")
|
||||
if dif_version_int >= 28:
|
||||
pipe = StableDiffusionPipeline.from_single_file(
|
||||
ckpt_path,config=sd15_config, original_config=original_config_file)
|
||||
@@ -200,7 +158,7 @@ class StableMakeup_LoadModel:
|
||||
pose_encoder.to("cuda")
|
||||
makeup_encoder.to("cuda")
|
||||
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
||||
"Lykon/dreamshaper-8",
|
||||
sd15_config,
|
||||
safety_checker=None,
|
||||
unet=Unet,
|
||||
vae=vae,
|
||||
|
||||
Reference in New Issue
Block a user