Coder Social home page Coder Social logo

s9roll7 / face_crop_img2img Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 4.0 3.38 MB

AUTOMATIC1111 UI custom script for img2img around face with different "Denoising Strength" settings

Python 100.00%
automatic1111 extension stable-diffusion stable-diffusion-webui-plugin

face_crop_img2img's People

Contributors

s9roll7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

face_crop_img2img's Issues

[BUG] saving images issue

Hi, awesome extension, but unfortunately I have always issue like this :

Traceback (most recent call last):
File "I:\Github\new_webui\stable-diffusion-webui\modules\call_queue.py", line 45, in f
res = list(func(*args, **kwargs))
File "I:\Github\new_webui\stable-diffusion-webui\modules\call_queue.py", line 28, in f
res = func(*args, **kwargs)
File "I:\Github\new_webui\stable-diffusion-webui\modules\img2img.py", line 150, in img2img
processed = modules.scripts.scripts_img2img.run(p, *args)
File "I:\Github\new_webui\stable-diffusion-webui\modules\scripts.py", line 337, in run
processed = script.run(p, *script_args)
File "I:\Github\new_webui\stable-diffusion-webui\extensions\face_crop_img2img\scripts\face_crop_img2img.py", line 237, in run
bg = merge_face(bg, face_img, coord, base_img_size, mask)
File "I:\Github\new_webui\stable-diffusion-webui\extensions\face_crop_img2img\scripts\face_crop_img2img.py", line 167, in merge_face
img_array[y: y+h, x: x+w] = mask * face_array + (1-mask)*bg
ValueError: operands could not be broadcast together with shapes (101,89,3) (101,89,4)

Any chance to fix ?

Picture splicing is not perfect

i found some problem,when i using this extension
Picture splicing is not perfect

like this:

微信图片_20230116180236

微信图片_20230116180351

微信图片_20230116180540

please help~plz
how could i fix this?

problem about Image style consistency

i've got a problem about Image style consistency

to me, use extension(face_crop_img2img) to fix face detiled, in order to get more perfect face

so i would holp that fixed-face is perfectly to siut the new whole picture style

but, when i using more, i found that was ignored

since we get the mask of face, we can do more things,

i holp:

  1. we can have a button to deside whether use face mask generate directly or use it like a mask and put it into new pircture which just use prompt to creat.
  2. we can have the buttons and options like [stable-diffusion-webui] in img2img-inpaint part of image.(expeciously the button of Full resolution partial redrawing, that can insure the Image style consistency)

thanks a lot

[BUG] OpenCV error

Hi, awesome extension, but unfortunately when I using YuNET, I have always issue like this :

Traceback (most recent call last):
File "C:\Users\kj4483\SD\stable-diffusion-webui\modules\call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "C:\Users\kj4483\SD\stable-diffusion-webui\modules\call_queue.py", line 36, in f
res = func(*args, **kwargs)
File "C:\Users\kj4483\SD\stable-diffusion-webui\modules\img2img.py", line 206, in img2img
processed = modules.scripts.scripts_img2img.run(p, *args)
File "C:\Users\kj4483\SD\stable-diffusion-webui\modules\scripts.py", line 601, in run
processed = script.run(p, *script_args)
File "C:\Users\kj4483\SD\stable-diffusion-webui\extensions\face_crop_img2img\scripts\face_crop_img2img.py", line 257, in run
face_coords = detect_face(base_img, p.image_mask,face_detection_method)
File "C:\Users\kj4483\SD\stable-diffusion-webui\extensions\face_crop_img2img\scripts\face_crop_img2img.py", line 240, in detect_face
return self.detect_face(img_array)
File "C:\Users\kj4483\SD\stable-diffusion-webui\extensions\face_crop_img2img\scripts\face_crop_img2img.py", line 102, in detect_face
_, result = self.face_detector.detect(img_array)
cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\net_impl.cpp:279: error: (-204:Requested object was not found) Layer with requested id=-1 not found in function 'cv::dnn::dnn4_v20230620::Net::Impl::getLayerData'

I've explored the above issues but have not been able to find a solution.

Any chance to fix ?

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.