Open freedomRen opened 1 year ago
--- a/modules/controlnet_aux/open_pose/init.py +++ b/modules/controlnet_aux/open_pose/init.py @@ -34,7 +34,7 @@ class OpenposeDetector: def from_pretrained(cls, pretrained_model_or_path, filename=None): filename = filename or "annotator/ckpts/body_pose_model.pth"
这里解析有点问题,文字描述 删除行 model_path = os.path.join(pretrained_model_or_path, filename) 增加行 body_model_path = os.path.join(pretrained_model_or_path, filename)
index 1d858d6..dac4a96 100644 --- a/modules/image_editing.py +++ b/modules/image_editing.py @@ -1,4 +1,5 @@ from modules.utils import * +from modules.mask_former import MaskFormer
要是原始的只加入 ImageCaptioning_cuda:0,Text2Image_cuda:0 看起来生成任务没啥问题,但是加入所有模块,我2块GPU 最后生成任务有bug 最后我现在资源分配如下 config_str = ''' ImageEditing_cuda:0 InstructPix2Pix_cuda:0 Text2Image_cuda:1 ImageCaptioning_cuda:1 Image2Canny_cpu CannyText2Image_cpu Image2Line_cpu LineText2Image_cpu Image2Hed_cpu HedText2Image_cpu Image2Scribble_cpu ScribbleText2Image_cuda:1 Image2Pose_cpu PoseText2Image_cpu Image2Seg_cpu SegText2Image_cuda:0 Image2Depth_cpu DepthText2Image_cpu Image2Normal_cpu NormalText2Image_cpu VisualQuestionAnswering_cpu ''' print(",".join(config_str.strip().split('\n')))
前两个bug我改了,第3个是偶发的还是说生成图片一直会出错?
生成任务出错概率极高。。
--- a/modules/controlnet_aux/open_pose/init.py +++ b/modules/controlnet_aux/open_pose/init.py @@ -34,7 +34,7 @@ class OpenposeDetector: def from_pretrained(cls, pretrained_model_or_path, filename=None): filename = filename or "annotator/ckpts/body_pose_model.pth"
body_model_path = hf_hub_download(pretrained_model_or_path, filename)
这里解析有点问题,文字描述 删除行 model_path = os.path.join(pretrained_model_or_path, filename) 增加行 body_model_path = os.path.join(pretrained_model_or_path, filename)
index 1d858d6..dac4a96 100644 --- a/modules/image_editing.py +++ b/modules/image_editing.py @@ -1,4 +1,5 @@ from modules.utils import * +from modules.mask_former import MaskFormer
要是原始的只加入 ImageCaptioning_cuda:0,Text2Image_cuda:0 看起来生成任务没啥问题,但是加入所有模块,我2块GPU 最后生成任务有bug 最后我现在资源分配如下 config_str = ''' ImageEditing_cuda:0 InstructPix2Pix_cuda:0 Text2Image_cuda:1 ImageCaptioning_cuda:1 Image2Canny_cpu CannyText2Image_cpu Image2Line_cpu LineText2Image_cpu Image2Hed_cpu HedText2Image_cpu Image2Scribble_cpu ScribbleText2Image_cuda:1 Image2Pose_cpu PoseText2Image_cpu Image2Seg_cpu SegText2Image_cuda:0 Image2Depth_cpu DepthText2Image_cpu Image2Normal_cpu NormalText2Image_cpu VisualQuestionAnswering_cpu ''' print(",".join(config_str.strip().split('\n')))