Ambrosinus - SD Local - Index out of Range

Hi all,
I’ve just installed the Ambrosinus toolkit today but having trouble getting it to work.

Ambrosinus Version 1.2.5

CN Version : webui-controlnet-v1-archived cloned from GitHub - lllyasviel/webui-controlnet-v1-archived: WebUI extension for ControlNet (v1 archived)

ckpt models : control_sd15_mlsd, control_sd15_canny as .pth files

Grasshopper is able launch the webUI process

Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]
Version: v1.6.0-2-g4afaaf8a
Commit hash: 4afaaf8a020c1df457bcf7250cb1c7f609699fa7
Launching Web UI with arguments: --api --lowvram --theme dark
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Loading weights [6ce0161689] from C:\Users\ami.nigam\Documents\SD_Local\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Running on local URL:

It is also able to run the process

To create a public link, set `share=True` in `launch()`.
Creating model from config: C:\Users\ami.nigam\Documents\SD_Local\stable-diffusion-webui\configs\v1-inference.yaml
Startup time: 30.1s (prepare environment: 6.0s, import torch: 9.9s, import gradio: 4.2s, setup paths: 3.1s, initialize shared: 0.7s, other imports: 2.2s, setup codeformer: 0.3s, load scripts: 2.4s, create ui: 0.4s, gradio launch: 0.8s).
Applying attention optimization: Doggettx... done.
Model loaded in 8.2s (load weights from disk: 0.9s, create model: 0.4s, apply weights to model: 3.4s, apply half(): 0.8s, calculate empty prompt: 2.6s).
Loading model: control_sd15_canny [fef5e48e]
Loaded state_dict from [C:\Users\ami.nigam\Documents\SD_Local\stable-diffusion-webui\extensions\webui-controlnet-v1-archived\models\control_sd15_canny.pth]
ControlNet model control_sd15_canny [fef5e48e] loaded.
Loading preprocessor: canny
100%|████████████████████████████████████████████████████████████████████████████████| 150/150 [04:14<00:00,  1.70s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████| 150/150 [04:12<00:00,  1.69s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████| 150/150 [04:12<00:00,  2.03s/it] 

But this data doesnt come through to gh

This is the error

1. Solution exception:Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Running webui-user.bat file directly seems to still work & I’m able to produce images through the web-ui.

Not sure if anyone has faced this, any help will be appreciated.

GH Definition attached below
SD (18.9 KB)

Hello Ami,
Thank you for your message…sorry for the delayed reply (I am still facing a couple of deadlines :sweat_smile:)…

ok xformers message means that maybe you don’t have installed the xformers python library yet or you didn’t activate the argument…(this library works well with NVIDIA graphic cards).

Now I will look at your file…anyway have you tried the definition shared in the example files? here:

Please, let me know I will keep you posted in a while…

[Back to you]
I run your file and seems to work properly.

  1. I have installed Python v3.10.6 unlike your version;

  2. Please check if your models are in the right place (just to be sure):
    Checkpoints and yaml

    SD models

  3. Remember the “ViewCapture” component goal…basically, it takes the View port image (I assume it is your 3D model and generate a scaled image in the DirPath folder)…if you have more than one image you need pass just a single item through the list item component otherwise ImagePath will pass the last image you took;

  4. Generally, I generate a ViewCapture image first and then set to true the AI engine (sometimes A1111 API can have some delay in running the code).

  5. this below is the output (anyway I used as base-definition that one I have suggested at top of this post.

So, I guess the main problem might be the Python version (I noticed that the development of the A1111 API doesn’t follow the same as that of the WebUI). Please, let me know :smiling_face: