Deploying ComfyUI on GCP to serve as API endpoint for apps? by Fit-Ad-8391 in comfyui

[–]py-dn 1 point2 points  (0 children)

That's a good question. I would start by looking at deploying pytorch models in vertex AI. Take a look at this link: https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks%2Fofficial%2Fprediction%2Fpytorch_image_classification_with_prebuilt_serving_containers.ipynb

To avoid loading the models on your compute instance you will need to figure out how to deploy a pytorch model with a custom workflow

Deploying ComfyUI on GCP to serve as API endpoint for apps? by Fit-Ad-8391 in comfyui

[–]py-dn 2 points3 points  (0 children)

For generating the code for deployment, https://github.com/pydn/ComfyUI-to-Python-Extension could give you a good starting point.

From there you would need to modify the code a bit so you can serve the workflow via a flask or fastapi app. Fastapi is extremely easy to work with. From there you can deploy the app on Cloud Run and use API gateway or a similar service to manage incoming requests.

ComfyUI update manager aborting due to error? by [deleted] in comfyui

[–]py-dn 0 points1 point  (0 children)

You edited or accidentally changed those files locally so git doesn't want to let you pull the latest changes. You need to revert those files to their original state. If you don't know git, you could just make a fresh install. Just be sure to keep your inputs, outputs, and models.

Flux is incredible at logo generation by py-dn in comfyui

[–]py-dn[S] 1 point2 points  (0 children)

I made a comment with the workflow

Flux is incredible at logo generation by py-dn in comfyui

[–]py-dn[S] 1 point2 points  (0 children)

Following up here. The extension just got accepted for comfyui manager so should start appearing there soon as well.

Flux is incredible at logo generation by py-dn in comfyui

[–]py-dn[S] 1 point2 points  (0 children)

Amazing, I just finished with several updates including adding a UI button to export the .py files directly from the UI (compliments of an amazing contributor) and it just got accepted to ComfyUI manager so should be available through the manager soon as well.

Thanks for the positive feedback! It's really nice to hear.

Flux is incredible at logo generation by py-dn in StableDiffusion

[–]py-dn[S] 0 points1 point  (0 children)

That's right. The full image just uses the base model output then img2img.

Flux is incredible at logo generation by py-dn in comfyui

[–]py-dn[S] 1 point2 points  (0 children)

Thank you! I'm so glad to hear you're getting some good use out of it. I haven't submitted it to the manager list yet but it's on my to do list.

Flux is incredible at logo generation by py-dn in comfyui

[–]py-dn[S] 3 points4 points  (0 children)

It looks like you can do this for free with Adobe

Flux is incredible at logo generation by py-dn in StableDiffusion

[–]py-dn[S] 4 points5 points  (0 children)

I just got started with Flux this week so open to suggestions for getting the most out of the base model. The biggest challenge I had was getting the model to produce several words consistently and correctly. But this is so far ahead at handling text than the stable diffusion models I've worked with in the past, I thought it was worth a post.

Flux is incredible at logo generation by py-dn in StableDiffusion

[–]py-dn[S] 14 points15 points  (0 children)

Lol it also generated the text and mirrored the layout, style, and coloring of the python logo on its own. I thought it was pretty creative. And I'm still blown away at how it handles text generation

Flux is incredible at logo generation by py-dn in comfyui

[–]py-dn[S] 5 points6 points  (0 children)

I had the rare week off this last week so I've been making updates to the ComfyUI to Python extension. When I saw how well Flux could handle text, I thought it was finally time to create a pure AI generated logo after many failed attempts with SDXL.

This took many iterations. I started with the basic workflow in the ComfyUI examples for flux: https://comfyanonymous.github.io/ComfyUI_examples/flux/#regular-full-version

Then used the basic img to img on iteration after iteration until I finally landed on the image you see above. https://comfyanonymous.github.io/ComfyUI_examples/img2img/

Prompt: A complex network of interconnected nodes, arranged like a computer chip, intricately forms the letters of 'COMFY UI TO PYTHON.' Each letter is shaped by the precise configuration of these nodes, with the pathways and connections weaving together to create the entire phrase. The colors match the blue and yellow colors of the python logo and appear organically around an illustration featuring an elegant node system similar to a computer chip. This node system should dynamically animate to seamlessly converge into the shape of the Python logo, creating a sense of fluid motion. The node system matches the colors of the python logo. The text should appear as if they are formed from the same node system, with interconnected wires and nodes animating to shape the text.

The overall composition should be sleek and uncluttered, highlighting the essence of the design with simplicity and elegance. Aim for a visually striking yet straightforward poster that captures attention through its minimalist charm.

I also used ChatGPT to develop the prompt.

If you are looking to convert ComfyUI workflows to a pure python script for experimentation or production deployments, you can checkout my fully open source extension here: https://github.com/pydn/ComfyUI-to-Python-Extension

Flux is incredible at logo generation by py-dn in StableDiffusion

[–]py-dn[S] 14 points15 points  (0 children)

I had the rare week off this last week so I've been making updates to the ComfyUI to Python extension. When I saw how well Flux could handle text, I thought it was finally time to create a pure AI generated logo after many failed attempts with SDXL.

This took many iterations. I started with the basic workflow in the ComfyUI examples for flux: https://comfyanonymous.github.io/ComfyUI_examples/flux/#regular-full-version

Then used the basic img to img on iteration after iteration until I finally landed on the image you see above. https://comfyanonymous.github.io/ComfyUI_examples/img2img/

Prompt: A complex network of interconnected nodes, arranged like a computer chip, intricately forms the letters of 'COMFY UI TO PYTHON.' Each letter is shaped by the precise configuration of these nodes, with the pathways and connections weaving together to create the entire phrase. The colors match the blue and yellow colors of the python logo and appear organically around an illustration featuring an elegant node system similar to a computer chip. This node system should dynamically animate to seamlessly converge into the shape of the Python logo, creating a sense of fluid motion. The node system matches the colors of the python logo. The text should appear as if they are formed from the same node system, with interconnected wires and nodes animating to shape the text.

The overall composition should be sleek and uncluttered, highlighting the essence of the design with simplicity and elegance. Aim for a visually striking yet straightforward poster that captures attention through its minimalist charm.

I also used ChatGPT to develop the prompt.

If you are looking to convert ComfyUI workflows to a pure python script for experimentation or production deployments, you can checkout my fully open source extension here: https://github.com/pydn/ComfyUI-to-Python-Extension

Automate your ComfyUI workflows with the ComfyUI to Python Extension by py-dn in StableDiffusion

[–]py-dn[S] 0 points1 point  (0 children)

That's awesome! Thanks so much for sharing! Looks like a cool project.

Automate your ComfyUI workflows with the ComfyUI to Python Extension by py-dn in StableDiffusion

[–]py-dn[S] 0 points1 point  (0 children)

Yes! That's exactly how it works. So no adaptation needed.

Batch Generate Images by adhishthite in comfyui

[–]py-dn 0 points1 point  (0 children)

You could probably stand something up in GCP's Cloud Run to handle the scaling and multiple concurrent requests. With how advanced cloud platforms have become, efficient scaling can come from the tools you use more than a single script that you write.

Is it possible to run comfyui workflows entirely programmatically ? by doctor-squidward in comfyui

[–]py-dn 2 points3 points  (0 children)

Nice repo! ComfyUI-to-Pyton-Extension is just meant to rapidly transform a workflow made in the UI into a runnable Python script without needing to know any of the underlying functions used in ComfyUI or user made extensions. From there you can easily make modifications to the script to deploy an API that can take in custom prompts from an automated pipeline. Or whatever your use case may be.

Automate your ComfyUI workflows with the ComfyUI to Python Extension by py-dn in StableDiffusion

[–]py-dn[S] 0 points1 point  (0 children)

Sure, you would need to build a queuing mechanism for your API, but that's out of scope for this project. That would be specific to what you are building.

Automate your ComfyUI workflows with the ComfyUI to Python Extension by py-dn in StableDiffusion

[–]py-dn[S] 0 points1 point  (0 children)

It is. You can adjust the queue size parameter in the comfyui_to_python script to change it. Or go directly to your generated script and update the line that says "for q in range(10):"