Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update comfui_stablediffusion, add checkpoints and lora #364

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

pschroedl
Copy link
Collaborator

Performance updates to ComfyUI_StableDiffusion from:
pschroedl/ComfyUI-StreamDiffusion#6
Example Workflow Updates:
pschroedl/ComfyUI-StreamDiffusion#7

Node now loads safetensor files ( full huggingface checkpoint loading is broken ), this PR adds checkpoints for:
sd_turbo.safetensors, kohaku_v2.1.safetensors and
https://huggingface.co/chenxxiao/3dCartoonVision_v10

and lora : ral-dissolve1.5
https://civitai.com/models/245889?modelVersionId=314246

Comment on lines 108 to 115
huggingface-cli download KBlueLeaf/kohaku-v2.1 --local-dir models/ComfyUI--models/checkpoints --include "*.safetensors"
huggingface-cli download stabilityai/sd-turbo --local-dir models/ComfyUI--models/checkpoints --include "*.safetensors"

# ComfyUI_StreamDIffusion is loading single file safetensors from /models/checkpoints
wget -P models/checkpoints/ https://huggingface.co/KBlueLeaf/kohaku-v2.1/resolve/main/kohaku-v2.1.safetensors
wget -P models/checkpoints/ https://huggingface.co/stabilityai/sd-turbo/resolve/main/sd_turbo.safetensors
# chenxxiao/3dCartoonVision_v10
wget -P models/checkpoints https://huggingface.co/chenxxiao/3dCartoonVision_v10/resolve/main/3dCartoonVision_v10.safetensors?download=true --content-disposition
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
huggingface-cli download KBlueLeaf/kohaku-v2.1 --local-dir models/ComfyUI--models/checkpoints --include "*.safetensors"
huggingface-cli download stabilityai/sd-turbo --local-dir models/ComfyUI--models/checkpoints --include "*.safetensors"
# ComfyUI_StreamDIffusion is loading single file safetensors from /models/checkpoints
wget -P models/checkpoints/ https://huggingface.co/KBlueLeaf/kohaku-v2.1/resolve/main/kohaku-v2.1.safetensors
wget -P models/checkpoints/ https://huggingface.co/stabilityai/sd-turbo/resolve/main/sd_turbo.safetensors
# chenxxiao/3dCartoonVision_v10
wget -P models/checkpoints https://huggingface.co/chenxxiao/3dCartoonVision_v10/resolve/main/3dCartoonVision_v10.safetensors?download=true --content-disposition
huggingface-cli download KBlueLeaf/kohaku-v2.1 --local-dir models/checkpoints --include "*.safetensors"
huggingface-cli download stabilityai/sd-turbo --local-dir models/checkpoints --include "*.safetensors"
# chenxxiao/3dCartoonVision_v10
huggingface-cli download chenxxiao/3dCartoonVision_v10 --local-dir models/checkpoints --include "*.safetensors"
  1. For the sake of consistency, can we change everything to get downloaded with huggingface-cli? This what I suggested worked for me
  2. Do I understand correctly that the streamdiffusion node takes models from /models/checkpoints and not from the comfyui workspace directory /comfui/models?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created HF-hub repos for checkpoints and Loras to get rid of wget downloads.

The streamdiffusion node takes models the comfyui workspace directory /comfui/models/checkpoints.


function download_stable_diffusion_loras() {
# ral-dissolve-sd15 LoRA
wget -P models/loras https://civitai.com/api/download/models/314246?type=Model&format=SafeTensor --content-disposition
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
wget -P models/loras https://civitai.com/api/download/models/314246?type=Model&format=SafeTensor --content-disposition
wget -P models/loras https://civitai.com/api/download/models/314246?type=Model\&format=SafeTensor --content-disposition

This does not work for me, it requires some civitai authentication. I get the following error:

Username/Password Authentication Failed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to HF

Copy link
Contributor

@leszko leszko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Added some comments. Other than that I tried to test it, but was not sure which API JSON is the one I should try.

I see that now you have a lot of them in the examples directory. I tried no_acceleration.json, but got the following error:

Cannot execute because node StreamDiffusionConfig does not exist.

Could you point me to the API JSON workflow that I can test?

@pschroedl
Copy link
Collaborator Author

Could you point me to the API JSON workflow that I can test?

All should be updated now to use the correctly named nodes.
The primary ones to test are:

  • img2img_no_acceleration_turbo_API_FORMAT.json
    -> just sd_turbo_15
  • img2img_no_acceleration_w_lora_API_FORMAT.json
    -> 3dCartoonVision + ral-dissolve lora

I've removed the older, outdated workflows from the repo

runner/dl_checkpoints.sh Outdated Show resolved Hide resolved
@leszko leszko merged commit cdcd84d into main Dec 17, 2024
5 of 11 checks passed
@leszko leszko deleted the update_comfyui_streamdiffusion branch December 17, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants