M-LSD annotator doesn't work at all

#15
by 925-Studio - opened

No matter how I change the value or change different indoor/building pictures, the annotator preview just shows totally black. The rest annotators work fine. Did I do something wrong? There's no error log in terminal and the .pth file has been downloaded. I'm using mac mini m1 with 16gb ram, latest ventura.

yes, I also come through this problem. Mlsd doesn't work at all. Also, I havn't see any video thoe showing it work on youtube, Probably there is a bug. It shows that it is working in the cmd, but actaully is does't work at all.

yes, I also come through this problem. Mlsd doesn't work at all. Also, I havn't see any video thoe showing it work on youtube, Probably there is a bug. It shows that it is working in the cmd, but actaully is does't work at all.

It works just fine, here is an example video, skip to 4:25

https://youtu.be/aY39egKfEfQ

yes, I also come through this problem. Mlsd doesn't work at all. Also, I havn't see any video thoe showing it work on youtube, Probably there is a bug. It shows that it is working in the cmd, but actaully is does't work at all.

It works just fine, here is an example video, skip to 4:25

https://youtu.be/aY39egKfEfQ

Everything should works fine but there's always exception(s), right? The point is to solve the problem but not by tell people 'It works just fine' which is not helping at all.

yes, I also come through this problem. Mlsd doesn't work at all. Also, I havn't see any video thoe showing it work on youtube, Probably there is a bug. It shows that it is working in the cmd, but actaully is does't work at all.

It works just fine, here is an example video, skip to 4:25

https://youtu.be/aY39egKfEfQ

Everything should works fine but there's always exception(s), right? The point is to solve the problem but not by tell people 'It works just fine' which is not helping at all.

Neither does it help just claiming it doesn't work at all and that there are no videos of it working, I provided you an example of it working and all you have is complain rather than provide any meaningful info that might lead to solving whatever issue you have (which clearly isn't a problem specific to the model), I'm done wasting time here.

Sorry for the mistake, But I still can't get mlsd working, Let's calm down and try to find a solution.

yes, I also come through this problem. Mlsd doesn't work at all. Also, I havn't see any video thoe showing it work on youtube, Probably there is a bug. It shows that it is working in the cmd, but actaully is does't work at all.

It works just fine, here is an example video, skip to 4:25

https://youtu.be/aY39egKfEfQ

Everything should works fine but there's always exception(s), right? The point is to solve the problem but not by tell people 'It works just fine' which is not helping at all.

Neither does it help just claiming it doesn't work at all and that there are no videos of it working, I provided you an example of it working and all you have is complain rather than provide any meaningful info that might lead to solving whatever issue you have (which clearly isn't a problem specific to the model), I'm done wasting time here.

Wow, you must be an excellent teacher! Tom asked a question (not even specifically ask you) about things are not working for him and you just pop up and tell Tom it's not a problem for Jamie. BRILLIANT! JUST BRILLIANT! BTW, you definitely was wasting time here.

Sorry for the mistake, But I still can't get mlsd working, Let's calm down and try to find a solution.

No problem, try looking up ControlNet here on Huggingface and you will find smaller CN models that are around 700mbs each, try downloading those and put them into the same folder of CN models inside the extensions folder, then try fiddling with the settings using an input image with clear hi-res architecture, increasing the resolution in CN settings tab will help M-LSD pick up more details, but don't increases it too much or you will get CUDA our of memory errors, so also make sure you aren't getting a CUDA out of memory in the background, this will result in the SD skipping CN and just generating a regular image (you will know when you don't get a additional sketch by CN showing you the analysis of the input image).

Loading model: control_mlsd-fp16 [e3705cfa]
Loaded state_dict from [E:\ai-drawing\amd\stable-diffusion-webui-directml\extensions\sd-webui-controlnet\models\control_mlsd-fp16.safetensors]
ControlNet model control_mlsd-fp16 [e3705cfa] loaded.
Loading preprocessor: mlsd
This is what it says, but the picture displayed is not similar to the one I uploaded. The area where the sketch should be is still blank. I have tried other processors, such as OpenPose, HERD, and Canny, and they all worked well. I have tried both the smaller and larger MLSD models, but neither worked. I have set the resolution to a very high value and the Hough value threshold (MLSD) and Hough distance threshold (MLSD) to 0.1. I am using the Scale to Fit (Inner Fit) option, but it still does not work. I am really upset. Have I made any mistakes?

Sorry for the mistake, But I still can't get mlsd working, Let's calm down and try to find a solution.

No problem, try looking up ControlNet here on Huggingface and you will find smaller CN models that are around 700mbs each, try downloading those and put them into the same folder of CN models inside the extensions folder, then try fiddling with the settings using an input image with clear hi-res architecture, increasing the resolution in CN settings tab will help M-LSD pick up more details, but don't increases it too much or you will get CUDA our of memory errors, so also make sure you aren't getting a CUDA out of memory in the background, this will result in the SD skipping CN and just generating a regular image (you will know when you don't get a additional sketch by CN showing you the analysis of the input image).

Loading model: control_mlsd-fp16 [e3705cfa]
Loaded state_dict from [E:\ai-drawing\amd\stable-diffusion-webui-directml\extensions\sd-webui-controlnet\models\control_mlsd-fp16.safetensors]
ControlNet model control_mlsd-fp16 [e3705cfa] loaded.
Loading preprocessor: mlsd
This is what it says, but the picture displayed is not similar to the one I uploaded. The area where the sketch should be is still blank. I have tried other processors, such as OpenPose, HERD, and Canny, and they all worked well. I have tried both the smaller and larger MLSD models, but neither worked. I have set the resolution to a very high value and the Hough value threshold (MLSD) and Hough distance threshold (MLSD) to 0.1. I am using the Scale to Fit (Inner Fit) option, but it still does not work. I am really upset. Have I made any mistakes?

This comment has been hidden
925-Studio changed discussion status to closed

win 10 with an amd GPU,using some patch to keep it working.

I doubt the lack of xformer is why it failed to work.

@Ascendant I just realized I made a mistake and I apologize for it. Apparently you were answering the question which asked by @fivess but I didn't see the quote. I simply thought you just tell us it is working but not telling us how to solve the problem. Sorry again for my stupidity. I regret those things I said to you.

@fivess What kind device you are using? I'm using apple silicon cpu and I can't help wonder maybe the MLSD model not very compatible with arm64. Other wise I can't figure it out why. I also tried the smaller model but no luck. I'm going to test it on colab and I hope I will get the results soon enought.

emmm.......it's a desktop that I made myself.

I just confirmed MLSD is working fine on Colab.

preview.png

result lines.png

result grid.png

Maybe your suspension is right, MLSD is not so friendly except Nvidia cards. If you like to try by yourself, here's the colab note file.

BTW, all default settings and also used smaller model file.

Em....... I came across something interesting today, When I set the processor to none, and set the model as mlsd. Guess what? It worked partly, showing something that is similar to the original one, So I guess there must be something wrong with the processor. I'll redownload it and try it later. Maby it will fix it.

I too had a black image showing up after almost all preprocessing. When I disabled brave browser shield it now renders open pose for me! Browser was blocking controlnet preview.

I too had a black image showing up after almost all preprocessing. When I disabled brave browser shield it now renders open pose for me! Browser was blocking controlnet preview.

Thank you! I am using Brave browser and I would not think that its shield would be blocking the previews shakes head. Now it is working for me.

I can confirm as for ControlNet 1.1, the MLSD preprocessing still does not work at all on macOS. June 2023.

I too had a black image showing up after almost all preprocessing. When I disabled brave browser shield it now renders open pose for me! Browser was blocking controlnet preview.

Thank you so very very much!!! 😍❤

Sign up or log in to comment