coolzilj / Blender-ControlNet

Using ControlNet right in Blender.
MIT License
760 stars 68 forks source link

Renders not following controlNet constraints #19

Closed Jordain closed 1 year ago

Jordain commented 1 year ago

I was testing your new update and it's not following the ControlNet constraints. I was specifically testing the depth map. I downloaded your sample .blend file and tried it out. I ran it once without making the modifications just to test it out and it still rendered without me changing the model name in is_send_depth(line 135). Since mine is different than yours.

I also grabbed the depth map that was generated and put it in stable diffusion web ui with the same constraints and it was using the constraints as intended.

Doesn't look like it's grabbing any values from the is_send_depth or any other is_send arguments. Just using the Params to generate image.

coolzilj commented 1 year ago

Did you see any error messages in the AUTOMATIC1111 console?

Jordain commented 1 year ago

no errors

Jordain commented 1 year ago

Is this working now? Does it work for anyone else and it was an issue on my end?

coolzilj commented 1 year ago

Sorry mate, can you try the latest version of https://github.com/coolzilj/Blender-ControlNet/blob/main/blender_templates/multicn_depth%2Bseg.blend Just change the depth model name if yours is different, and turn off is_send_seg if you don't have segmentation model. Save and Run Script, hit F12 see if it works.

Jordain commented 1 year ago

No, it still looks like it's not working. I am just trying the depth map, but its not following any of the constraints within the is_send_depth code block. I put in the correct model and it didn't give me an error and I put in no value at all and it doesn't give me an error either.

When I ran the previous version of your tool it said that the map was loading in the command prompt window. It doesn't do that for this version. When you run it do you get that message?

coolzilj commented 1 year ago

if it said the map was loading in the command prompt window, it should be work correctly. I just tested the latest version of multicn_depth+seg.blend, it is fine. I can't help you without further infomations, maybe you can test the API in http://localhost:7860/docs#/ see if API actually works.

Jordain commented 1 year ago

Ill try it again in the morning. Do you think it might have to do with my version of auto1111? What do you mean test it in the API? Look for the model names in there? Or something else?

coolzilj commented 1 year ago

Ill try it again in the morning. Do you think it might have to do with my version of auto1111? What do you mean test it in the API? Look for the model names in there? Or something else?

image It's executable. See the Try it out button? You can use the same parameters as in Blender script to test if it works. If it still doesn't work, there may be something wrong with your version of auto1111.

Jordain commented 1 year ago

Thanks, it's working now! The problem was that my version of Auto1111 was out of date. I thought it was updating because I had git pull in my webui-user.bat, but it wasn't updating nor giving me an error. I checked the hash value of my version and on auto1111 remote server and it was out to date. I ended cloning a new repo and tried your script again and it worked :)! If anyone is looking at the comment in the future I ended up cloning the remote version: 22bcc7b and it worked.