Instructions to use bbbboiwow/cocccck with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use bbbboiwow/cocccck with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("bbbboiwow/cocccck", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| import { app } from "../../../scripts/app.js"; | |
| import { ComfyWidgets } from "../../../scripts/widgets.js"; | |
| // Displays input text on a node | |
| app.registerExtension({ | |
| name: "pysssss.StringFunction", | |
| async beforeRegisterNodeDef(nodeType, nodeData, app) { | |
| if (nodeData.name === "StringFunction|pysssss") { | |
| const onExecuted = nodeType.prototype.onExecuted; | |
| nodeType.prototype.onExecuted = function (message) { | |
| onExecuted?.apply(this, arguments); | |
| if (this.widgets) { | |
| const pos = this.widgets.findIndex((w) => w.name === "result"); | |
| if (pos !== -1) { | |
| for (let i = pos; i < this.widgets.length; i++) { | |
| this.widgets[i].onRemove?.(); | |
| } | |
| this.widgets.length = pos; | |
| } | |
| } | |
| const w = ComfyWidgets["STRING"](this, "result", ["STRING", { multiline: true }], app).widget; | |
| w.inputEl.readOnly = true; | |
| w.inputEl.style.opacity = 0.6; | |
| w.value = message.text; | |
| this.onResize?.(this.size); | |
| }; | |
| } | |
| }, | |
| }); | |