Go back

How to download and use custom models

This guide provides a comprehensive overview of installing models in ComfyUI VM solution provided by Techlatest.net.

  1. Once your ‘Comfy UI: Stable Diffusion AI Image Generation Made Simple’ VM is up and running , you can connect to VM via SSH to download and use new models/checkpoints.

Note: By default this vm comes with SDXL Base 1.0 checkpoint model.

  1. To connect to the SSH terminal, please follow our Getting Started Guide of respective cloud provider.

  2. Once connected to SSH terminal, navigate to checkpoints directory using-

cd /home/ubuntu/setup/ComfyUI/models/checkpoints

/img/azure/comfyui-vm/navigate-checkpoint-dir.png

  1. There are several channels available to download the Stable Diffusion model, such as Hugging Face. Search for the download URL of your desired checkpoint model.
  • For example, in this guide, we will download the Stable Cascade model for ComfyUI from Hugging Face using wget.

  • To do so, go to Hugging Face website. Open Models page.

/img/azure/comfyui-vm/hugging-face-website.png

  • On Models page, search for your required model in the top search bar. You can also apply different filters to search around. Here we will search with stable cascade and select the first option stabilityai/stable-cascade from the search results.

/img/azure/comfyui-vm/models-search-result.png

  • It will open a stable cascade model’s details page. On this page click on Files and Versions tab as shown below.

/img/azure/comfyui-vm/files-and-versions.png

  • On Files and Versions page, open ComfyUI Checkpoints folder.

/img/azure/comfyui-vm/comfyui-checkpoints.png

  • It will show you list of available ComfyUI checkpoints. Click on the desired one. You can copy the download link from this page and paste in the below wget command to download the model on your ComfyUI VM.

/img/azure/comfyui-vm/available-checkpoints.png

/img/azure/comfyui-vm/copy-download-link.png

wget https://huggingface.co/stabilityai/stable-cascade/resolve/main/comfyui_checkpoints/stable_cascade_stage_b.safetensors

Replace URL with your models URL.

/img/azure/comfyui-vm/download-checkpoint.png

/img/azure/comfyui-vm/model-downloaded.png

  1. Now, our model is available in the checkpoints directory of ComfyUI setup Folder.

/img/azure/comfyui-vm/ls-checkpoints-dir.png

  1. Now, refresh the ComfyUI page in your browser. You should be able to select the Stable Cascade checkpoint from the Checkpoints dropdown.

Note: If, for any reason, your model is not available on the ComfyUI page, reboot the VM and check again.

/img/azure/comfyui-vm/stable-cascade-chkpnt.png

  1. The default checkpoint model on this VM is stable-diffusion-xl-base-1.0. If you select a workflow from the available templates in the ComfyUI Web UI and it shows an error about the checkpoint model while running it, you can either switch the template to use the model already available on this VM using “Load Checkpoint” dropdown node, or you can download the checkpoint model required by that template.

/img/azure/comfyui-vm/template.png

  1. To download the checkpoint model required by that template, simply copy the checkpoint URL from the error message and repeat step 1-3 from above guide. Once you are in “/home/ubuntu/setup/ComfyUI/models/checkpoints/” directory, paste the copied URL of the model from step 7 above with wget command.
wget https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors

/img/azure/comfyui-vm/model-error.png

/img/azure/comfyui-vm/download-model.png

  1. Once the model download is successful, you should be able to run your template workflow.

/img/azure/comfyui-vm/model-download-complete.png

/img/azure/comfyui-vm/running-a-template.png

Note: If you are using any model which need authentication on that platform , you need to provide it in your wget command.

e.g

wget –header=“Authorization: Bearer YOUR_TOKEN_HERE” “MODEL_URL_HERE”

Go back