Instructions to use vetak8/My-ComfyUI-Models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use vetak8/My-ComfyUI-Models with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("vetak8/My-ComfyUI-Models", torch_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'; | |
| app.registerExtension({ | |
| name: 'Comfy.INSTARAW.APIModelSelector', | |
| async beforeRegisterNodeDef(nodeType, nodeData, app) { | |
| if (nodeData.name === 'INSTARAW_API_ModelSelector') { | |
| const onNodeCreated = nodeType.prototype.onNodeCreated; | |
| nodeType.prototype.onNodeCreated = function () { | |
| onNodeCreated?.apply(this, arguments); | |
| // Create the warning widget for this node | |
| const warningWidget = ComfyWidgets["STRING"](this, "unreliable_provider_warning", ["STRING", { multiline: true }], app).widget; | |
| warningWidget.inputEl.readOnly = true; | |
| warningWidget.inputEl.style.backgroundColor = '#442222'; | |
| warningWidget.inputEl.style.color = '#FFCCCC'; | |
| warningWidget.inputEl.style.opacity = '0.8'; | |
| warningWidget.value = '⚠️ For this model, the fal.ai provider is unreliable for Image-to-Image (Edit) tasks. wavespeed.ai recommended.'; | |
| warningWidget.hidden = true; // Initially hidden | |
| const modelWidget = this.widgets.find((w) => w.name === 'model'); | |
| if (modelWidget) { | |
| const originalCallback = modelWidget.callback; | |
| // Add our logic to the dropdown's callback | |
| modelWidget.callback = (value) => { | |
| originalCallback?.(value); | |
| this.updateWarningWidget(); | |
| }; | |
| } | |
| // Add a function to the node to update the widget | |
| this.updateWarningWidget = () => { | |
| const isProblematic = (modelWidget.value === 'Nano Banana'); | |
| warningWidget.hidden = !isProblematic; | |
| this.computeSize(); | |
| this.setDirtyCanvas(true, true); | |
| }; | |
| // Run once on creation to set the initial state | |
| setTimeout(() => this.updateWarningWidget(), 1); | |
| }; | |
| } | |
| }, | |
| }); |