FaceChain V2 - 阿里开源版“妙鸭”,一张照片10秒生成多种风格个人写真,本地一键整合包下载
FaceChain是一个可以用来生成个人写真的深度学习模型工具。在最新的FaceChain FACT版本中,用户仅需要提供一张照片即可10秒钟获得独属于自己的个人写真(支持多种风格)。
FaceChain可实现兼具可控性与ID保持能力的无限风格写真与固定模板写真功能,同时对ControlNet和LoRA具有优秀的兼容能力。
FaceChain支持在gradio的界面中使用模型训练和推理能力、支持资深开发者使用python脚本进行训练推理,也支持在sd webui中安装插件使用。
今天分享的是最新版的FaceChain,方便区分,我取名叫FaceChain V2版,官方的命名是 FaceChain FACT 版。和旧版的 FaceChain相比,新版只需要一张图片,就可以生成几十种不同风格的人物写真。
新版的模板风格也从上个版本的13种增加到了79种,除此之外,新版还新增了“免训练固定模板形象写真(Fixed Templates Portrait)”,类似AI绘画的图生图功能,只需要提供一个模板,即可生成和模板类似风格的图像。
新版同样支持“自定义风格模型训练”,只需要少量照片,即可训练一套属于自己独特风格的写真模型,并且兼容现成的LoRa与ControlNet。
因FaceChain FACT 版新增了72种自带模板风格,模型文件较大,光模型文件就有42个G,所以此次一键包分为两部分,一键包和模型包。因模型下载镜像托管在阿里的魔塔,所以国内下载速度还是很快的,网速快的,可以只下载一键包,运行启动后,会自动下载模型。
你也可以单独下载模型包,按提示解压到指定路径。模型包太大,估计要等一段时间上传。
温馨提示:只支持N卡,显存8G起
生成案例:(默认参数和提示词)
参考图
生成效果图
藏族风
多巴胺
古风
国风
婚纱
蒙古风
苗族风
校服风
印度风
使用教程:
上传一张需要生成人像的照片,比如你自己的照片,选择生成的模板风格,然后点生成即可。
下载地址内有详细使用视频教程。
2025年2月9日报 "获取模型版本失败" 修复补丁:
补丁链接:https://pan.quark.cn/s/5c0da5f0a2d7 下载后,拷贝到一键包根目录,右键解压到当前文件夹,根据提示覆盖即可。
然后再次运行一键启动,会自动下载一个5G左右的模型包,耐心等待完成。
下载地址:(下载前,请先阅读 使用说明 再下载,避免不必要的问题和纠纷)
**** 本内容需购买 ****
这个不错啊 xinghe1 发表于 2024-9-11 19:47
从这上面下载的AI 软件10个里面9个都无法正常使用,不是这里出错就是那里出错
...
你一共下载了有10个吗?张嘴就来?
为什么别人都能用,就你用不了,不找找自己的原因? 学习一下,支持楼主~ 老大,执行了几到,到这里就出错了,帮忙看一下
工作服(Working suit)
2024-09-13 11:17:05,498 - modelscope - INFO - Use user-specified model revision: v1.0.1
2024-09-13 11:17:07,051 - modelscope - INFO - Use user-specified model revision: v1.0.1
C:\FaceChain-V2\python\lib\site-packages\mmcv\__init__.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
warnings.warn(
2024-09-13 11:17:08,104 - modelscope - INFO - initiate model from cache/modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing
2024-09-13 11:17:08,105 - modelscope - INFO - initiate model from location cache/modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing.
2024-09-13 11:17:08,108 - modelscope - INFO - initialize model from cache/modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing
2024-09-13 11:17:08,329 - modelscope - INFO - loading model from cache/modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing\pytorch_model.pt
2024-09-13 11:17:08,636 - modelscope - INFO - criterion.empty_weight doesn't exist in current model, skip loading.
2024-09-13 11:17:08,673 - modelscope - INFO - load model done
2024-09-13 11:17:08,687 - modelscope - WARNING - No preprocessor field found in cfg.
2024-09-13 11:17:08,687 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file.
2024-09-13 11:17:08,688 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': 'cache/modelscope\\hub\\damo\\cv_resnet101_image-multiple-human-parsing'}. trying to build by task and model information.
2024-09-13 11:17:08,688 - modelscope - WARNING - No preprocessor key ('m2fp', 'image-segmentation') found in PREPROCESSOR_MAP, skip building preprocessor.
2024-09-13 11:17:09,386 - modelscope - INFO - Use user-specified model revision: v1.0.3
Traceback (most recent call last):
File "C:\FaceChain-V2\python\lib\site-packages\modelscope\hub\file_download.py", line 312, in http_get_file
r.raise_for_status()
File "C:\FaceChain-V2\python\lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://www.modelscope.cn/api/v1/models/damo/cv_unet_face_fusion_torch/repo?Revision=v1.0.3&FilePath=image_face_fusion/facegan/__init__.py
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\FaceChain-V2\app.py", line 574, in <module>
gen_portrait = GenPortrait()
File "C:\FaceChain-V2\facechain\inference_fact.py", line 297, in __init__
self.image_face_fusion = pipeline('face_fusion_torch',
File "C:\FaceChain-V2\python\lib\site-packages\modelscope\pipelines\builder.py", line 115, in pipeline
model = normalize_model_input(
File "C:\FaceChain-V2\python\lib\site-packages\modelscope\pipelines\builder.py", line 36, in normalize_model_input
model = snapshot_download(
File "C:\FaceChain-V2\python\lib\site-packages\modelscope\hub\snapshot_download.py", line 149, in snapshot_download
http_get_file(
File "C:\FaceChain-V2\python\lib\site-packages\modelscope\hub\file_download.py", line 332, in http_get_file
retry = retry.increment('GET', url, error=e)
File "C:\FaceChain-V2\python\lib\site-packages\urllib3\util\retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: None: Max retries exceeded with url: https://www.modelscope.cn/api/v1/models/damo/cv_unet_face_fusion_torch/repo?Revision=v1.0.3&FilePath=image_face_fusion/facegan/__init__.py (Caused by HTTPError('500 Server Error: Internal Server Error for url: https://www.modelscope.cn/api/v1/models/damo/cv_unet_face_fusion_torch/repo?Revision=v1.0.3&FilePath=image_face_fusion/facegan/__init__.py'))
请按任意键继续. . .
Arwar 发表于 2024-9-13 11:19
老大,执行了几到,到这里就出错了,帮忙看一下
关掉,多试几次,这是下载模型网络错误
或者换个时间段
亦或者等我哪天空了把模型传网盘,40多个G,估计得传一天了。。。 试了好多次,每次都在这里就出错了 Arwar 发表于 2024-9-13 11:19
老大,执行了几到,到这里就出错了,帮忙看一下
特意在晚上下载,还是到同一个地方就执行不下去 就是到“工作服” 这里就报错。我还特意把已经下载的删掉,重新启动后很快就重新下载完成。有没有可能是“工作服”这个模型出错了呢?
工作服(Working suit)
2024-09-14 00:06:46,616 - modelscope - INFO - Use user-specified model revision: v1.0.1
2024-09-14 00:06:48,358 - modelscope - INFO - Use user-specified model revision: v1.0.1
C:\FaceChain-V2\python\lib\site-packages\mmcv\__init__.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
warnings.warn(
2024-09-14 00:06:49,552 - modelscope - INFO - initiate model from cache/modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing
2024-09-14 00:06:49,554 - modelscope - INFO - initiate model from location cache/modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing.
2024-09-14 00:06:49,555 - modelscope - INFO - initialize model from cache/modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing
2024-09-14 00:06:49,978 - modelscope - INFO - loading model from cache/modelscope\hub\damo\cv_resnet101_image-multiple-human-parsing\pytorch_model.pt
2024-09-14 00:06:50,529 - modelscope - INFO - criterion.empty_weight doesn't exist in current model, skip loading.
2024-09-14 00:06:50,553 - modelscope - INFO - load model done
2024-09-14 00:06:50,565 - modelscope - WARNING - No preprocessor field found in cfg.
2024-09-14 00:06:50,566 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file.
2024-09-14 00:06:50,566 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': 'cache/modelscope\\hub\\damo\\cv_resnet101_image-multiple-human-parsing'}. trying to build by task and model information.
2024-09-14 00:06:50,566 - modelscope - WARNING - No preprocessor key ('m2fp', 'image-segmentation') found in PREPROCESSOR_MAP, skip building preprocessor.
2024-09-14 00:06:51,429 - modelscope - INFO - Use user-specified model revision: v1.0.3
Traceback (most recent call last):
File "C:\FaceChain-V2\python\lib\site-packages\modelscope\hub\file_download.py", line 312, in http_get_file
r.raise_for_status()
File "C:\FaceChain-V2\python\lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://www.modelscope.cn/api/v1/models/damo/cv_unet_face_fusion_torch/repo?Revision=v1.0.3&FilePath=image_face_fusion/facegan/__init__.py
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\FaceChain-V2\app.py", line 574, in <module>
gen_portrait = GenPortrait()
File "C:\FaceChain-V2\facechain\inference_fact.py", line 297, in __init__
self.image_face_fusion = pipeline('face_fusion_torch',
File "C:\FaceChain-V2\python\lib\site-packages\modelscope\pipelines\builder.py", line 115, in pipeline
model = normalize_model_input(
File "C:\FaceChain-V2\python\lib\site-packages\modelscope\pipelines\builder.py", line 36, in normalize_model_input
model = snapshot_download(
File "C:\FaceChain-V2\python\lib\site-packages\modelscope\hub\snapshot_download.py", line 149, in snapshot_download
http_get_file(
File "C:\FaceChain-V2\python\lib\site-packages\modelscope\hub\file_download.py", line 332, in http_get_file
retry = retry.increment('GET', url, error=e)
File "C:\FaceChain-V2\python\lib\site-packages\urllib3\util\retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: None: Max retries exceeded with url: https://www.modelscope.cn/api/v1/models/damo/cv_unet_face_fusion_torch/repo?Revision=v1.0.3&FilePath=image_face_fusion/facegan/__init__.py (Caused by HTTPError('500 Server Error: Internal Server Error for url: https://www.modelscope.cn/api/v1/models/damo/cv_unet_face_fusion_torch/repo?Revision=v1.0.3&FilePath=image_face_fusion/facegan/__init__.py'))
请按任意键继续. . .