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
| import { app } from "../../../scripts/app.js"; | |
| // Allows you to manage preset tags for e.g. common negative prompt | |
| // Also performs replacements on any text field e.g. allowing you to use preset text in CLIP Text encode fields | |
| let replaceRegex; | |
| const id = "pysssss.PresetText.Presets"; | |
| const MISSING = Symbol(); | |
| const getPresets = () => { | |
| let items; | |
| try { | |
| items = JSON.parse(localStorage.getItem(id)); | |
| } catch (error) {} | |
| if (!items || !items.length) { | |
| items = [{ name: "default negative", value: "worst quality" }]; | |
| } | |
| return items; | |
| }; | |
| let presets = getPresets(); | |
| app.registerExtension({ | |
| name: "pysssss.PresetText", | |
| setup() { | |
| app.ui.settings.addSetting({ | |
| id: "pysssss.PresetText.ReplacementRegex", | |
| name: "🐍 Preset Text Replacement Regex", | |
| type: "text", | |
| defaultValue: "(?:^|[^\\w])(?<replace>@(?<id>[\\w-]+))", | |
| tooltip: | |
| "The regex should return two named capture groups: id (the name of the preset text to use), replace (the matched text to replace)", | |
| attrs: { | |
| style: { | |
| fontFamily: "monospace", | |
| }, | |
| }, | |
| onChange(value) { | |
| if (!value) { | |
| replaceRegex = null; | |
| return; | |
| } | |
| try { | |
| replaceRegex = new RegExp(value, "g"); | |
| } catch (error) { | |
| alert("Error creating regex for preset text replacement, no replacements will be performed."); | |
| replaceRegex = null; | |
| } | |
| }, | |
| }); | |
| const drawNodeWidgets = LGraphCanvas.prototype.drawNodeWidgets | |
| LGraphCanvas.prototype.drawNodeWidgets = function(node) { | |
| const c = LiteGraph.WIDGET_BGCOLOR; | |
| try { | |
| if(node[MISSING]) { | |
| LiteGraph.WIDGET_BGCOLOR = "red" | |
| } | |
| return drawNodeWidgets.apply(this, arguments); | |
| } finally { | |
| LiteGraph.WIDGET_BGCOLOR = c; | |
| } | |
| } | |
| }, | |
| registerCustomNodes() { | |
| class PresetTextNode extends LiteGraph.LGraphNode { | |
| constructor() { | |
| super(); | |
| this.title = "Preset Text 🐍"; | |
| this.isVirtualNode = true; | |
| this.serialize_widgets = true; | |
| this.addOutput("text", "STRING"); | |
| const widget = this.addWidget("combo", "value", presets[0].name, () => {}, { | |
| values: presets.map((p) => p.name), | |
| }); | |
| this.addWidget("button", "Manage", "Manage", () => { | |
| const container = document.createElement("div"); | |
| Object.assign(container.style, { | |
| display: "grid", | |
| gridTemplateColumns: "1fr 1fr", | |
| gap: "10px", | |
| }); | |
| const addNew = document.createElement("button"); | |
| addNew.textContent = "Add New"; | |
| addNew.classList.add("pysssss-presettext-addnew"); | |
| Object.assign(addNew.style, { | |
| fontSize: "13px", | |
| gridColumn: "1 / 3", | |
| color: "dodgerblue", | |
| width: "auto", | |
| textAlign: "center", | |
| }); | |
| addNew.onclick = () => { | |
| addRow({ name: "", value: "" }); | |
| }; | |
| container.append(addNew); | |
| function addRow(p) { | |
| const name = document.createElement("input"); | |
| const nameLbl = document.createElement("label"); | |
| name.value = p.name; | |
| nameLbl.textContent = "Name:"; | |
| nameLbl.append(name); | |
| const value = document.createElement("input"); | |
| const valueLbl = document.createElement("label"); | |
| value.value = p.value; | |
| valueLbl.textContent = "Value:"; | |
| valueLbl.append(value); | |
| addNew.before(nameLbl, valueLbl); | |
| } | |
| for (const p of presets) { | |
| addRow(p); | |
| } | |
| const help = document.createElement("span"); | |
| help.textContent = "To remove a preset set the name or value to blank"; | |
| help.style.gridColumn = "1 / 3"; | |
| container.append(help); | |
| dialog.show(""); | |
| dialog.textElement.append(container); | |
| }); | |
| const dialog = new app.ui.dialog.constructor(); | |
| dialog.element.classList.add("comfy-settings"); | |
| const closeButton = dialog.element.querySelector("button"); | |
| closeButton.textContent = "CANCEL"; | |
| const saveButton = document.createElement("button"); | |
| saveButton.textContent = "SAVE"; | |
| saveButton.onclick = function () { | |
| const inputs = dialog.element.querySelectorAll("input"); | |
| const p = []; | |
| for (let i = 0; i < inputs.length; i += 2) { | |
| const n = inputs[i]; | |
| const v = inputs[i + 1]; | |
| if (!n.value.trim() || !v.value.trim()) { | |
| continue; | |
| } | |
| p.push({ name: n.value, value: v.value }); | |
| } | |
| widget.options.values = p.map((p) => p.name); | |
| if (!widget.options.values.includes(widget.value)) { | |
| widget.value = widget.options.values[0]; | |
| } | |
| presets = p; | |
| localStorage.setItem(id, JSON.stringify(presets)); | |
| dialog.close(); | |
| }; | |
| closeButton.before(saveButton); | |
| this.applyToGraph = function (workflow) { | |
| // For each output link copy our value over the original widget value | |
| if (this.outputs[0].links && this.outputs[0].links.length) { | |
| for (const l of this.outputs[0].links) { | |
| const link_info = app.graph.links[l]; | |
| const outNode = app.graph.getNodeById(link_info.target_id); | |
| const outIn = outNode && outNode.inputs && outNode.inputs[link_info.target_slot]; | |
| if (outIn.widget) { | |
| const w = outNode.widgets.find((w) => w.name === outIn.widget.name); | |
| if (!w) continue; | |
| const preset = presets.find((p) => p.name === widget.value); | |
| if (!preset) { | |
| this[MISSING] = true; | |
| app.graph.setDirtyCanvas(true, true); | |
| const msg = `Preset text '${widget.value}' not found. Please fix this and queue again.`; | |
| throw new Error(msg); | |
| } | |
| delete this[MISSING]; | |
| w.value = preset.value; | |
| } | |
| } | |
| } | |
| }; | |
| } | |
| } | |
| LiteGraph.registerNodeType( | |
| "PresetText|pysssss", | |
| Object.assign(PresetTextNode, { | |
| title: "Preset Text 🐍", | |
| }) | |
| ); | |
| PresetTextNode.category = "utils"; | |
| }, | |
| nodeCreated(node) { | |
| if (node.widgets) { | |
| // Locate dynamic prompt text widgets | |
| const widgets = node.widgets.filter((n) => n.type === "customtext" || n.type === "text"); | |
| for (const widget of widgets) { | |
| const callbacks = [ | |
| () => { | |
| let prompt = widget.value; | |
| if (replaceRegex && typeof prompt.replace !== 'undefined') { | |
| prompt = prompt.replace(replaceRegex, (match, p1, p2, index, text, groups) => { | |
| if (!groups.replace || !groups.id) return match; // No match, bad regex? | |
| const preset = presets.find((p) => p.name.replaceAll(/\s/g, "-") === groups.id); | |
| if (!preset) return match; // Invalid name | |
| const pos = match.indexOf(groups.replace); | |
| return match.substring(0, pos) + preset.value; | |
| }); | |
| } | |
| return prompt; | |
| }, | |
| ]; | |
| let inheritedSerializeValue = widget.serializeValue || null; | |
| let called = false; | |
| const serializeValue = async (workflowNode, widgetIndex) => { | |
| const origWidgetValue = widget.value; | |
| if (called) return origWidgetValue; | |
| called = true; | |
| let allCallbacks = [...callbacks]; | |
| if (inheritedSerializeValue) { | |
| allCallbacks.push(inheritedSerializeValue) | |
| } | |
| let valueIsUndefined = false; | |
| for (const cb of allCallbacks) { | |
| let value = await cb(workflowNode, widgetIndex); | |
| // Need to check the callback return value before it is set on widget.value as it coerces it to a string (even for undefined) | |
| if (value === undefined) valueIsUndefined = true; | |
| widget.value = value; | |
| } | |
| const prompt = valueIsUndefined ? undefined : widget.value; | |
| widget.value = origWidgetValue; | |
| called = false; | |
| return prompt; | |
| }; | |
| Object.defineProperty(widget, "serializeValue", { | |
| get() { | |
| return serializeValue; | |
| }, | |
| set(cb) { | |
| inheritedSerializeValue = cb; | |
| }, | |
| }); | |
| } | |
| } | |
| }, | |
| }); | |