Instructions to use LuckyOda/comfyui-carbonara-bundle with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use LuckyOda/comfyui-carbonara-bundle with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="LuckyOda/comfyui-carbonara-bundle", filename="models/text_encoders/qwen-4b-zimage-heretic-q8.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use LuckyOda/comfyui-carbonara-bundle with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf LuckyOda/comfyui-carbonara-bundle # Run inference directly in the terminal: llama cli -hf LuckyOda/comfyui-carbonara-bundle
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf LuckyOda/comfyui-carbonara-bundle # Run inference directly in the terminal: llama cli -hf LuckyOda/comfyui-carbonara-bundle
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf LuckyOda/comfyui-carbonara-bundle # Run inference directly in the terminal: ./llama-cli -hf LuckyOda/comfyui-carbonara-bundle
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf LuckyOda/comfyui-carbonara-bundle # Run inference directly in the terminal: ./build/bin/llama-cli -hf LuckyOda/comfyui-carbonara-bundle
Use Docker
docker model run hf.co/LuckyOda/comfyui-carbonara-bundle
- LM Studio
- Jan
- Ollama
How to use LuckyOda/comfyui-carbonara-bundle with Ollama:
ollama run hf.co/LuckyOda/comfyui-carbonara-bundle
- Unsloth Studio
How to use LuckyOda/comfyui-carbonara-bundle with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LuckyOda/comfyui-carbonara-bundle to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LuckyOda/comfyui-carbonara-bundle to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for LuckyOda/comfyui-carbonara-bundle to start chatting
- Pi
How to use LuckyOda/comfyui-carbonara-bundle with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LuckyOda/comfyui-carbonara-bundle
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "LuckyOda/comfyui-carbonara-bundle" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use LuckyOda/comfyui-carbonara-bundle with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LuckyOda/comfyui-carbonara-bundle
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default LuckyOda/comfyui-carbonara-bundle
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use LuckyOda/comfyui-carbonara-bundle with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LuckyOda/comfyui-carbonara-bundle
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "LuckyOda/comfyui-carbonara-bundle" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use LuckyOda/comfyui-carbonara-bundle with Docker Model Runner:
docker model run hf.co/LuckyOda/comfyui-carbonara-bundle
- Lemonade
How to use LuckyOda/comfyui-carbonara-bundle with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LuckyOda/comfyui-carbonara-bundle
Run and chat with the model
lemonade run user.comfyui-carbonara-bundle-{{QUANT_TAG}}List all available models
lemonade list
| from ..utils import log | |
| import torch | |
| def set_transformer_cache_method(transformer, timesteps, cache_args=None): | |
| transformer.cache_device = cache_args["cache_device"] | |
| if cache_args["cache_type"] == "TeaCache": | |
| log.info(f"TeaCache: Using cache device: {transformer.cache_device}") | |
| transformer.teacache_state.clear_all() | |
| transformer.enable_teacache = True | |
| transformer.rel_l1_thresh = cache_args["rel_l1_thresh"] | |
| transformer.teacache_start_step = cache_args["start_step"] | |
| transformer.teacache_end_step = len(timesteps)-1 if cache_args["end_step"] == -1 else cache_args["end_step"] | |
| transformer.teacache_use_coefficients = cache_args["use_coefficients"] | |
| transformer.teacache_mode = cache_args["mode"] | |
| elif cache_args["cache_type"] == "MagCache": | |
| log.info(f"MagCache: Using cache device: {transformer.cache_device}") | |
| transformer.magcache_state.clear_all() | |
| transformer.enable_magcache = True | |
| transformer.magcache_start_step = cache_args["start_step"] | |
| transformer.magcache_end_step = len(timesteps)-1 if cache_args["end_step"] == -1 else cache_args["end_step"] | |
| transformer.magcache_thresh = cache_args["magcache_thresh"] | |
| transformer.magcache_K = cache_args["magcache_K"] | |
| elif cache_args["cache_type"] == "EasyCache": | |
| log.info(f"EasyCache: Using cache device: {transformer.cache_device}") | |
| transformer.easycache_state.clear_all() | |
| transformer.enable_easycache = True | |
| transformer.easycache_start_step = cache_args["start_step"] | |
| transformer.easycache_end_step = len(timesteps)-1 if cache_args["end_step"] == -1 else cache_args["end_step"] | |
| transformer.easycache_thresh = cache_args["easycache_thresh"] | |
| return transformer | |
| class TeaCacheState: | |
| def __init__(self, cache_device='cpu'): | |
| self.cache_device = cache_device | |
| self.states = {} | |
| self._next_pred_id = 0 | |
| def new_prediction(self, cache_device='cpu'): | |
| """Create new prediction state and return its ID""" | |
| self.cache_device = cache_device | |
| pred_id = self._next_pred_id | |
| self._next_pred_id += 1 | |
| self.states[pred_id] = { | |
| 'previous_residual': None, | |
| 'accumulated_rel_l1_distance': 0, | |
| 'previous_modulated_input': None, | |
| 'skipped_steps': [], | |
| } | |
| return pred_id | |
| def update(self, pred_id, **kwargs): | |
| """Update state for specific prediction""" | |
| if pred_id not in self.states: | |
| return None | |
| for key, value in kwargs.items(): | |
| self.states[pred_id][key] = value | |
| def get(self, pred_id): | |
| return self.states.get(pred_id, {}) | |
| def clear_all(self): | |
| self.states = {} | |
| self._next_pred_id = 0 | |
| class MagCacheState: | |
| def __init__(self, cache_device='cpu'): | |
| self.cache_device = cache_device | |
| self.states = {} | |
| self._next_pred_id = 0 | |
| def new_prediction(self, cache_device='cpu'): | |
| """Create new prediction state and return its ID""" | |
| self.cache_device = cache_device | |
| pred_id = self._next_pred_id | |
| self._next_pred_id += 1 | |
| self.states[pred_id] = { | |
| 'residual_cache': None, | |
| 'accumulated_ratio': 1.0, | |
| 'accumulated_steps': 0, | |
| 'accumulated_err': 0, | |
| 'skipped_steps': [], | |
| } | |
| return pred_id | |
| def update(self, pred_id, **kwargs): | |
| """Update state for specific prediction""" | |
| if pred_id not in self.states: | |
| return None | |
| for key, value in kwargs.items(): | |
| self.states[pred_id][key] = value | |
| def get(self, pred_id): | |
| return self.states.get(pred_id, {}) | |
| def clear_all(self): | |
| self.states = {} | |
| self._next_pred_id = 0 | |
| class EasyCacheState: | |
| def __init__(self, cache_device='cpu'): | |
| self.cache_device = cache_device | |
| self.states = {} | |
| self._next_pred_id = 0 | |
| def new_prediction(self, cache_device='cpu'): | |
| """Create a new prediction state and return its ID.""" | |
| self.cache_device = cache_device | |
| pred_id = self._next_pred_id | |
| self._next_pred_id += 1 | |
| self.states[pred_id] = { | |
| 'previous_raw_input': None, | |
| 'previous_raw_output': None, | |
| 'cache': None, | |
| 'accumulated_error': 0.0, | |
| 'skipped_steps': [], | |
| 'cache_ovi': None, | |
| } | |
| return pred_id | |
| def update(self, pred_id, **kwargs): | |
| """Update state for a specific prediction.""" | |
| if pred_id not in self.states: | |
| return None | |
| for key, value in kwargs.items(): | |
| self.states[pred_id][key] = value | |
| def get(self, pred_id): | |
| return self.states.get(pred_id, {}) | |
| def clear_all(self): | |
| self.states = {} | |
| self._next_pred_id = 0 | |
| def relative_l1_distance(last_tensor, current_tensor): | |
| l1_distance = torch.abs(last_tensor.to(current_tensor.device) - current_tensor).mean() | |
| norm = torch.abs(last_tensor).mean() | |
| relative_l1_distance = l1_distance / norm | |
| return relative_l1_distance.to(torch.float32).to(current_tensor.device) | |
| def cache_report(transformer, cache_args): | |
| cache_type = cache_args["cache_type"] | |
| states = ( | |
| transformer.teacache_state.states if cache_type == "TeaCache" else | |
| transformer.magcache_state.states if cache_type == "MagCache" else | |
| transformer.easycache_state.states if cache_type == "EasyCache" else | |
| None | |
| ) | |
| state_names = { | |
| 0: "conditional", | |
| 1: "unconditional" | |
| } | |
| for pred_id, state in states.items(): | |
| name = state_names.get(pred_id, f"prediction_{pred_id}") | |
| if 'skipped_steps' in state: | |
| log.info(f"{cache_type} skipped: {len(state['skipped_steps'])} {name} steps: {state['skipped_steps']}") | |
| transformer.teacache_state.clear_all() | |
| transformer.magcache_state.clear_all() | |
| transformer.easycache_state.clear_all() | |
| del states |