Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Add comfy to local apps #855

Open
melMass opened this issue Aug 17, 2024 · 4 comments · May be fixed by #948
Open

[feat] Add comfy to local apps #855

melMass opened this issue Aug 17, 2024 · 4 comments · May be fixed by #948

Comments

@melMass
Copy link

melMass commented Aug 17, 2024

image
@julien-c
Copy link
Member

what URL would the link open?

@melMass
Copy link
Author

melMass commented Aug 17, 2024

I would say either the Github repo or the new ComfyOrg website/org, here are candidates:

@julien-c
Copy link
Member

no sorry, what i meant is that we would need a model-specific URL to "deeplink" into a local ComfyUI instance, that would in turn download the model in question

Those links are displayed on model pages in "Use this model" dropdown so they need to be model-specific.

see the deeplink properties in this object:

export const LOCAL_APPS = {
"llama.cpp": {
prettyLabel: "llama.cpp",
docsUrl: "https://github.com/ggerganov/llama.cpp",
mainTask: "text-generation",
displayOnModelPage: isGgufModel,
snippet: snippetLlamacpp,
},
lmstudio: {
prettyLabel: "LM Studio",
docsUrl: "https://lmstudio.ai",
mainTask: "text-generation",
displayOnModelPage: isGgufModel,
deeplink: (model, filepath) =>
new URL(`lmstudio://open_from_hf?model=${model.id}${filepath ? `&file=${filepath}` : ""}`),
},
localai: {
prettyLabel: "LocalAI",
docsUrl: "https://github.com/mudler/LocalAI",
mainTask: "text-generation",
displayOnModelPage: isGgufModel,
snippet: snippetLocalAI,
},
jan: {
prettyLabel: "Jan",
docsUrl: "https://jan.ai",
mainTask: "text-generation",
displayOnModelPage: isGgufModel,
deeplink: (model) => new URL(`jan://models/huggingface/${model.id}`),
},
backyard: {
prettyLabel: "Backyard AI",
docsUrl: "https://backyard.ai",
mainTask: "text-generation",
displayOnModelPage: isGgufModel,
deeplink: (model) => new URL(`https://backyard.ai/hf/model/${model.id}`),
},
sanctum: {
prettyLabel: "Sanctum",
docsUrl: "https://sanctum.ai",
mainTask: "text-generation",
displayOnModelPage: isGgufModel,
deeplink: (model) => new URL(`sanctum://open_from_hf?model=${model.id}`),
},
jellybox: {
prettyLabel: "Jellybox",
docsUrl: "https://jellybox.com",
mainTask: "text-generation",
displayOnModelPage: (model) =>
isGgufModel(model) ||
(model.library_name === "diffusers" &&
model.tags.includes("safetensors") &&
(model.pipeline_tag === "text-to-image" || model.tags.includes("lora"))),
deeplink: (model) => {
if (isGgufModel(model)) {
return new URL(`jellybox://llm/models/huggingface/LLM/${model.id}`);
} else if (model.tags.includes("lora")) {
return new URL(`jellybox://image/models/huggingface/ImageLora/${model.id}`);
} else {
return new URL(`jellybox://image/models/huggingface/Image/${model.id}`);
}
},
},
msty: {
prettyLabel: "Msty",
docsUrl: "https://msty.app",
mainTask: "text-generation",
displayOnModelPage: isGgufModel,
deeplink: (model) => new URL(`msty://models/search/hf/${model.id}`),
},
recursechat: {
prettyLabel: "RecurseChat",
docsUrl: "https://recurse.chat",
mainTask: "text-generation",
macOSOnly: true,
displayOnModelPage: isGgufModel,
deeplink: (model) => new URL(`recursechat://new-hf-gguf-model?hf-model-id=${model.id}`),
},
drawthings: {
prettyLabel: "Draw Things",
docsUrl: "https://drawthings.ai",
mainTask: "text-to-image",
macOSOnly: true,
displayOnModelPage: (model) =>
model.library_name === "diffusers" && (model.pipeline_tag === "text-to-image" || model.tags.includes("lora")),
deeplink: (model) => {
if (model.tags.includes("lora")) {
return new URL(`https://drawthings.ai/import/diffusers/pipeline.load_lora_weights?repo_id=${model.id}`);
} else {
return new URL(`https://drawthings.ai/import/diffusers/pipeline.from_pretrained?repo_id=${model.id}`);
}
},
},
diffusionbee: {
prettyLabel: "DiffusionBee",
docsUrl: "https://diffusionbee.com",
mainTask: "text-to-image",
macOSOnly: true,
displayOnModelPage: (model) => model.library_name === "diffusers" && model.pipeline_tag === "text-to-image",
deeplink: (model) => new URL(`diffusionbee://open_from_hf?model=${model.id}`),
},
joyfusion: {
prettyLabel: "JoyFusion",
docsUrl: "https://joyfusion.app",
mainTask: "text-to-image",
macOSOnly: true,
displayOnModelPage: (model) =>
model.tags.includes("coreml") && model.tags.includes("joyfusion") && model.pipeline_tag === "text-to-image",
deeplink: (model) => new URL(`https://joyfusion.app/import_from_hf?repo_id=${model.id}`),
},
invoke: {
prettyLabel: "Invoke",
docsUrl: "https://github.com/invoke-ai/InvokeAI",
mainTask: "text-to-image",
displayOnModelPage: (model) => model.library_name === "diffusers" && model.pipeline_tag === "text-to-image",
deeplink: (model) => new URL(`https://models.invoke.ai/huggingface/${model.id}`),
},
} satisfies Record<string, LocalApp>;

@melMass
Copy link
Author

melMass commented Aug 17, 2024

Oh that's awesome I didn't know.
I don't think comfy register any url scheme like that yet.
Let me ask the org about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants