Instructions to use saik0s/comfy_backup with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use saik0s/comfy_backup with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="saik0s/comfy_backup", filename="ComfyUI/models/text_encoders/gemma-3-12b-it-q2_k.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 saik0s/comfy_backup 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 saik0s/comfy_backup:Q4_K_S # Run inference directly in the terminal: llama cli -hf saik0s/comfy_backup:Q4_K_S
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf saik0s/comfy_backup:Q4_K_S # Run inference directly in the terminal: llama cli -hf saik0s/comfy_backup:Q4_K_S
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 saik0s/comfy_backup:Q4_K_S # Run inference directly in the terminal: ./llama-cli -hf saik0s/comfy_backup:Q4_K_S
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 saik0s/comfy_backup:Q4_K_S # Run inference directly in the terminal: ./build/bin/llama-cli -hf saik0s/comfy_backup:Q4_K_S
Use Docker
docker model run hf.co/saik0s/comfy_backup:Q4_K_S
- LM Studio
- Jan
- Ollama
How to use saik0s/comfy_backup with Ollama:
ollama run hf.co/saik0s/comfy_backup:Q4_K_S
- Unsloth Studio
How to use saik0s/comfy_backup 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 saik0s/comfy_backup 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 saik0s/comfy_backup to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for saik0s/comfy_backup to start chatting
- Pi
How to use saik0s/comfy_backup with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saik0s/comfy_backup:Q4_K_S
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": "saik0s/comfy_backup:Q4_K_S" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use saik0s/comfy_backup with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saik0s/comfy_backup:Q4_K_S
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 saik0s/comfy_backup:Q4_K_S
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use saik0s/comfy_backup with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saik0s/comfy_backup:Q4_K_S
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 "saik0s/comfy_backup:Q4_K_S" \ --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 saik0s/comfy_backup with Docker Model Runner:
docker model run hf.co/saik0s/comfy_backup:Q4_K_S
- Lemonade
How to use saik0s/comfy_backup with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull saik0s/comfy_backup:Q4_K_S
Run and chat with the model
lemonade run user.comfy_backup-Q4_K_S
List all available models
lemonade list
| from PIL import Image, ImageDraw, ImageFont | |
| import numpy as np | |
| import torch | |
| def pil2tensor(image): | |
| """Convert PIL image to tensor in the correct format""" | |
| return torch.from_numpy(np.array(image).astype(np.float32) / 255.0).unsqueeze(0) | |
| class HiDreamResolutionNode: | |
| def INPUT_TYPES(cls): | |
| return { | |
| "required": { | |
| "resolution": ([ | |
| "1:1 (Perfect Square)", | |
| "3:4 (Standard Portrait)", | |
| "2:3 (Classic Portrait)", | |
| "9:16 (Widescreen Portrait)", | |
| "4:3 (Standard Landscape)", | |
| "3:2 (Classic Landscape)", | |
| "16:9 (Widescreen Landscape)", | |
| ], {"default": "1:1 (Perfect Square)"}), | |
| } | |
| } | |
| RETURN_TYPES = ("INT", "INT", "STRING", "IMAGE") | |
| RETURN_NAMES = ("width", "height", "resolution", "preview") | |
| FUNCTION = "get_dimensions" | |
| CATEGORY = "ControlAltAI Nodes/HiDream" | |
| OUTPUT_NODE = True | |
| def create_preview_image(self, width, height, resolution): | |
| # 1024x1024 preview size | |
| preview_size = (1024, 1024) | |
| image = Image.new('RGB', preview_size, (0, 0, 0)) # Black background | |
| draw = ImageDraw.Draw(image) | |
| # Draw grid with grey lines | |
| grid_color = '#333333' # Dark grey for grid | |
| grid_spacing = 50 # Adjusted grid spacing | |
| for x in range(0, preview_size[0], grid_spacing): | |
| draw.line([(x, 0), (x, preview_size[1])], fill=grid_color) | |
| for y in range(0, preview_size[1], grid_spacing): | |
| draw.line([(0, y), (preview_size[0], y)], fill=grid_color) | |
| # Calculate preview box dimensions | |
| preview_width = 800 # Increased size | |
| preview_height = int(preview_width * (height / width)) | |
| # Adjust if height is too tall | |
| if preview_height > 800: # Adjusted for larger preview | |
| preview_height = 800 | |
| preview_width = int(preview_height * (width / height)) | |
| # Calculate center position | |
| x_offset = (preview_size[0] - preview_width) // 2 | |
| y_offset = (preview_size[1] - preview_height) // 2 | |
| # Draw the aspect ratio box with thicker outline | |
| draw.rectangle( | |
| [(x_offset, y_offset), (x_offset + preview_width, y_offset + preview_height)], | |
| outline='red', | |
| width=4 # Thicker outline | |
| ) | |
| # Add text with larger font sizes | |
| try: | |
| # Draw text (centered) | |
| text_y = y_offset + preview_height//2 | |
| # Resolution text in red | |
| draw.text((preview_size[0]//2, text_y), | |
| f"{width}x{height}", | |
| fill='red', | |
| anchor="mm", | |
| font=ImageFont.truetype("arial.ttf", 48)) | |
| except: | |
| # Fallback if font loading fails | |
| draw.text((preview_size[0]//2, text_y), f"{width}x{height}", fill='red', anchor="mm") | |
| # Convert to tensor using the helper function | |
| return pil2tensor(image) | |
| def get_dimensions(self, resolution): | |
| # Map from aspect ratio to actual dimensions | |
| resolution_map = { | |
| "1:1 (Perfect Square)": (1024, 1024), | |
| "3:4 (Standard Portrait)": (880, 1168), | |
| "2:3 (Classic Portrait)": (832, 1248), | |
| "9:16 (Widescreen Portrait)": (768, 1360), | |
| "4:3 (Standard Landscape)": (1168, 880), | |
| "3:2 (Classic Landscape)": (1248, 832), | |
| "16:9 (Widescreen Landscape)": (1360, 768) | |
| } | |
| # Get dimensions from the map | |
| width, height = resolution_map[resolution] | |
| # Resolution as string | |
| resolution_str = f"{width} x {height}" | |
| # Generate preview image | |
| preview = self.create_preview_image(width, height, resolution_str) | |
| return width, height, resolution_str, preview | |
| def gcd(a, b): | |
| """Calculate the Greatest Common Divisor of a and b.""" | |
| while b: | |
| a, b = b, a % b | |
| return a | |
| NODE_CLASS_MAPPINGS = { | |
| "HiDreamResolutionNode": HiDreamResolutionNode, | |
| } | |
| NODE_DISPLAY_NAME_MAPPINGS = { | |
| "HiDreamResolutionNode": "HiDream Resolution", | |
| } |