<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Guillaume Bieler on Medium]]></title>
        <description><![CDATA[Stories by Guillaume Bieler on Medium]]></description>
        <link>https://medium.com/@guillaume.bieler?source=rss-9fecc0e3ad68------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7_YnO8-pk_fnN15su_Vomw.png</url>
            <title>Stories by Guillaume Bieler on Medium</title>
            <link>https://medium.com/@guillaume.bieler?source=rss-9fecc0e3ad68------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 15:45:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@guillaume.bieler/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Comfy Cloud vs ViewComfy: Which Comfy Hosting Platform Is Right for You?]]></title>
            <link>https://medium.com/@guillaume.bieler/comfy-cloud-vs-viewcomfy-which-comfy-hosting-platform-is-right-for-you-ee8974b4a033?source=rss-9fecc0e3ad68------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee8974b4a033</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Guillaume Bieler]]></dc:creator>
            <pubDate>Wed, 21 Jan 2026 16:25:15 GMT</pubDate>
            <atom:updated>2026-01-21T16:25:15.075Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DPnWR7RwQncl0T-t7Uy_RQ.png" /></figure><p>ComfyUI has become a popular interface for building advanced image and video generation workflows, but its flexibility often comes with setup complexity and GPU requirements.</p><p>To solve this, several platforms now offer ComfyUI in the cloud. Two of the most notable options are Comfy Cloud and ViewComfy, both removing the need for local hardware, but optimized for very different use cases.</p><p>This post breaks down how Comfy Cloud vs ViewComfy compare across performance, pricing, flexibility, and production readiness, so you can choose the platform that best fits your workflow.</p><h3>What Is Comfy Cloud?</h3><p>Comfy Cloud is the official cloud offering for running ComfyUI with zero setup. It’s designed to get users from opening their browser to generating images in seconds.</p><p>The platform focuses on simplicity:</p><ul><li>No installation</li><li>Preloaded models and node packs</li><li>Automatic updates</li><li>Shared access to powerful GPUs</li></ul><p>For creators who want to explore ComfyUI quickly or avoid any configuration overhead, Comfy Cloud removes nearly all friction.</p><h3>What Is ViewComfy?</h3><p>ViewComfy is a ComfyUI hosting platform built for teams that need a flexible, scalable, and private environment to run workflows. If it runs locally, it can run on ViewComfy.</p><p>ViewComfy gives users:</p><ul><li>A private ComfyUI environment running on dedicated GPUs</li><li>Full access to the ComfyUI Manager, including support for private custom nodes</li><li>Private model storage that supports any model type</li><li>The ability to turn workflows into apps or APIs in just a few clicks</li></ul><p>Where Comfy Cloud optimizes for immediacy, ViewComfy optimizes for flexibility, scalability, and large teams that don’t necessarily know ComfyUI.</p><h3>TLDR: The difference largely comes down to Setup Time vs Flexibility</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*ZjjwUhIaRxOPBrWGMA3hgg.png" /></figure><p>Comfy Cloud shines when your workflow already fits its environment.<br>ViewComfy shines when your workflow diverges from the standard or needs to run at scale.</p><h4>Dedicated GPU vs Shared GPU Architecture</h4><p>One of the most important differences between Comfy Cloud and ViewComfy is how GPU resources are allocated.</p><h4>Comfy Cloud: Shared GPU Cluster</h4><p>Comfy Cloud runs all users on a shared cluster of RTX 6000 GPUs.</p><p>Benefits</p><ul><li>No setup required</li><li>Minimal cold-start time</li><li>No infrastructure decisions required</li></ul><p>Trade-offs</p><ul><li>Requests may be queued during peak traffic</li><li>No option to choose faster GPUs</li></ul><h3>ViewComfy: One Workflow, One GPU Cluster</h3><p>ViewComfy assigns a dedicated GPU cluster to each workflow, selectable from a range of GPU options.</p><p>Benefits</p><ul><li>Fully isolated performance</li><li>Ability to customize autoscaling behavior to match usage patterns</li><li>Predictable latency</li><li>Option to run workflows on GPUs that best match the workload</li></ul><p>Trade-offs</p><ul><li>Depending on autoscaling configuration, cold starts may occur</li><li>While the infrastructure works out of the box, it requires configuration to handle sustained high load efficiently</li></ul><h3>Pricing: Credits vs Transparent GPU Seconds</h3><h4>Comfy Cloud Pricing</h4><p>Comfy Cloud uses a credit-based system, where GPU usage consumes credits based on how many resources a workflow requires.</p><p>This is simple to get started with, but can make cost forecasting harder.</p><h4>ViewComfy Pricing</h4><p>ViewComfy uses per-GPU-second pricing, based on the GPU model in use. This makes it straightforward to forecast costs across workflows, users, and projects.</p><h3>Custom Nodes, Dependencies, and Model Flexibility</h3><h4>Comfy Cloud</h4><p>Comfy Cloud provides:</p><ul><li>A curated set of pre-installed custom nodes</li><li>Preloaded popular models</li><li>LoRA imports from CivitAI on select plans</li></ul><p>However:</p><ul><li>You cannot install node packs that are not already available</li><li>Model availability is limited to what’s preloaded (outside of LoRAs)</li></ul><p>This keeps the platform stable, but limits flexibility for advanced or highly customized workflows.</p><h4>ViewComfy</h4><p>ViewComfy exposes the full ComfyUI Manager, just like a local setup:</p><ul><li>Install any public or private custom node</li><li>Pull nodes from private GitHub repositories</li><li>Install system and Python dependencies</li><li>Import any model into permanent storage</li></ul><p>The main drawback of this approach is that the workflow needs to be set up before it can be used for the first time.</p><h3>From Workflows to Apps and APIs</h3><p>This is where the two platforms diverge most clearly.</p><h4>Comfy Cloud: Interactive Creation</h4><p>Comfy Cloud is optimized for usage inside the ComfyUI interface. It’s ideal for solo creators or teams already comfortable with ComfyUI who simply need a place to run their workflows online.</p><h4>ViewComfy: Production Deployment</h4><p>ViewComfy is designed to take workflows beyond ComfyUI:</p><ul><li>Turn workflows into web apps that non-technical users can use</li><li>Organize and share apps internally via your own App Hub</li><li>Deploy workflows as autoscaling APIs</li><li>Integrate easily with existing products and pipelines</li></ul><p>This makes ViewComfy well suited for design teams where not everyone knows ComfyUI, as well as for teams building products that require a scalable API.</p><h3>Team Management and Observability</h3><h4>Comfy Cloud</h4><ul><li>Simple onboarding</li><li>Limited team controls</li><li>Primarily focused on individual usage</li></ul><h4>ViewComfy</h4><ul><li>User and team management</li><li>Usage dashboards</li><li>Cost tracking and visibility</li></ul><h3>Which Platform Should You Choose?</h3><p>Choose Comfy Cloud if you:</p><ul><li>Want instant access to ComfyUI</li><li>Prefer zero configuration</li><li>Mostly use standard workflows</li><li>Don’t need custom infrastructure</li></ul><p>Choose ViewComfy if you:</p><ul><li>Need dedicated GPUs</li><li>Install custom or private nodes</li><li>Require full control over your model library</li><li>Deploy workflows as apps or APIs</li><li>Manage teams and costs at scale</li></ul><h3>Final Thoughts</h3><p>Both platforms are excellent — but they solve different problems.</p><p>Comfy Cloud lowers the barrier to entry for ComfyUI. ViewComfy turns ComfyUI into production infrastructure.</p><p>If you’re experimenting, Comfy Cloud is hard to beat. If you’re building tools others rely on, ViewComfy is built for that reality.</p><p>Want to see how your existing workflow runs on a dedicated GPU? Try <a href="https://www.viewcomfy.com/">ViewComfy</a> and turn your ComfyUI workflows into apps or APIs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee8974b4a033" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is SageAttention and Why It Matters for Faster Generative Workflows]]></title>
            <link>https://medium.com/@guillaume.bieler/what-is-sageattention-and-why-it-matters-for-faster-generative-workflows-314e6c65d06c?source=rss-9fecc0e3ad68------2</link>
            <guid isPermaLink="false">https://medium.com/p/314e6c65d06c</guid>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Guillaume Bieler]]></dc:creator>
            <pubDate>Fri, 09 Jan 2026 17:23:11 GMT</pubDate>
            <atom:updated>2026-01-09T17:23:11.816Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*miCtWBZdsvIH60YlPoKODg.png" /></figure><p>If you’ve been in the generative media space for a while, chances are you’ve already heard of SageAttention. After using it for nearly a year with consistently great results, and getting asked about it again and again, we decided it was time to write a proper explanation.</p><p>This article breaks down what SageAttention is and why it has become a near-essential component of modern generative media pipelines. If you use tools like ComfyUI and have ever wondered what’s happening under the hood when you try to speed up your generations, you might find this interesting.</p><h3>Why You Should Be Using SageAttention</h3><p>SageAttention is one of the most effective ways to speed up generations without sacrificing output quality.</p><p>In practice, attention layers inside AI models account for a large share of the total compute cost in generative models. Optimizing them has a direct and noticeable impact on performance, and that’s exactly what SageAttention does.</p><p>To put this into numbers:</p><ul><li>2× to 4× faster generation on average, depending on hardware and models</li><li>Around 3× faster than FlashAttention 2 (on RTX 4090)</li><li>Roughly 4.5× faster than xFormers (on RTX 4090)</li><li>Close to 10× faster than standard PyTorch attention kernels (on RTX 4090)</li></ul><p>Exact gains vary depending on hardware and models, but the results are always significant.</p><h3>What SageAttention Is (And How It Works)</h3><p>When using generative models, whether for images, video, or text, computing “attention” accounts for a significant portion of the total runtime. Attention is responsible for contextual understanding, selective focus, and long-range dependencies. As resolutions increase, videos get longer, and prompts become more complex, this part of the computation becomes increasingly expensive.</p><p>At a high level, SageAttention is an optimized attention algorithm designed to make these computations faster without changing the model itself. To understand why this works, it helps to simplify what attention does.</p><p>Attention layers perform a large number of matrix multiplications to determine what should influence what. In image generation, this means relating pixels and features to one another. In text generation, it means relating words and tokens across the entire context. This math is costly, and its cost grows quickly as inputs get larger.</p><p>Traditionally, these calculations are performed using relatively high numerical precision. SageAttention reduces the precision of those operations, using lower-bit representations where full precision isn’t strictly necessary. Modern GPUs handle this type of math much more efficiently, resulting in substantial speedups.</p><p>The key point is that this reduction in precision has little to no visible impact on output quality. Any model that relies heavily on transformer-style attention can benefit from this approach.</p><h3>Why It’s Not Enabled by Default</h3><p>A common question is: if this works so well, why isn’t it enabled by default everywhere?</p><p>The short answer is that SageAttention is tightly coupled to hardware.</p><p>Its performance and compatibility depend on:</p><ul><li>GPU architecture</li><li>CUDA version</li><li>Support for specific low-precision operations</li></ul><p>Because of this, it’s not something most tools can safely enable for all users out of the box. That’s why, in environments like ComfyUI, SageAttention typically needs to be installed manually.</p><h3>Different versions</h3><p>SageAttention has evolved quickly since its introduction:</p><ul><li>Early versions introduced the core idea: quantized attention that trades a small amount of numerical precision for large speed gains.</li><li>SageAttention 2 refined this approach significantly, improving both performance and stability. For most users today, this version offers the best balance between speed and output quality.</li><li>SageAttention 3, released more recently, pushes performance even further, especially on newer GPU architectures. The trade-off is a slightly higher cost to accuracy, making it more situational depending on the use case.</li></ul><p>For most creative pipelines, in 2026, SageAttention 2 remains the practical choice.</p><h3>How to Install SageAttention Today</h3><p>Installing SageAttention used to be fairly painful. Fortunately, that’s no longer the case.</p><p>Base requirements:</p><ul><li>Python ≥ 3.9</li><li>PyTorch ≥ 2.3.0</li><li>Triton ≥ 3.0.0</li><li>CUDA ≥ 12.8<br><em>(It works on some GPUs work with older CUDA versions, but 12.0 should be considered a minimum.)</em></li></ul><p>Once those are in place, you can use pip to install SageAttention:</p><pre>pip install sageattention==2.2.0 --no-build-isolation`</pre><h3>Conclusion</h3><p>In short, SageAttention is a clever algorithm that speeds up computations when using generative models, at almost no cost to output quality. Because it’s relatively new and tightly coupled to GPU hardware, it doesn’t come enabled by default in tools like ComfyUI. The good news is that installing it today is far simpler than it was even a year ago, and the performance gains are significant and definitely wortht it.</p><p>If you want to see SageAttention in action, we have a template with SageAttention 2 already set up on <a href="https://www.viewcomfy.com/">ViewComfy cloud</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=314e6c65d06c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Best ComfyUI Hosting Platforms in 2025]]></title>
            <link>https://medium.com/@guillaume.bieler/the-best-comfyui-hosting-platforms-in-2025-98c6087735e7?source=rss-9fecc0e3ad68------2</link>
            <guid isPermaLink="false">https://medium.com/p/98c6087735e7</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <dc:creator><![CDATA[Guillaume Bieler]]></dc:creator>
            <pubDate>Thu, 07 Aug 2025 12:25:32 GMT</pubDate>
            <atom:updated>2025-08-07T12:30:46.397Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kjYlNAfJZ_f6EoLRZN9jdg.png" /></figure><p>ComfyUI has undoubtedly come out on top when it comes to accessing open-source AI models for image and video generation. What makes it so powerful is how flexible it is, making it a perfect tool to build and automate GenAI powered pipelines. All of this through an easy-to-use node-based interface.</p><p>For people needing to take those pipelines to the next level and run them in the cloud, there are a few great options tailored to different use cases. In this post, we compare the top platforms in 2025 for hosting ComfyUI workflows for different profiles, from solo artists needing a quick and easy setup to enterprise teams looking for a robust and scalable platform.</p><p>In particular, we reviewed the following services:</p><ul><li><a href="https://www.viewcomfy.com/">ViewComfy</a></li><li><a href="https://www.runcomfy.com/">RunComfy</a></li><li><a href="https://www.runpod.io/">RunPod</a></li><li><a href="https://replicate.com/">Replicate</a></li><li><a href="https://www.rundiffusion.com/">RunDiffusion</a></li><li><a href="https://comfy.icu/">ComfyICU</a></li></ul><h3>Comparison Table</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TsvxMcjR6BefwKF5XHGVEQ.png" /></figure><h3><a href="https://www.viewcomfy.com/">ViewComfy</a>: A fast and easy way to turn workflows into APIs or Web Apps without writing a line of code.</h3><p>ViewComfy is a cloud platform designed to run ComfyUI workflows and transform them into shareable web apps or serverless APIs without needing to write any code. It provides fully customizable environments where users can install any custom node, Python library, or model, giving users full flexibility over their setup.</p><p>Beyond simply running workflows through the standard ComfyUI interface, ViewComfy focuses on helping users build user-friendly applications on top of their workflows. With its no-code app builder, you can easily turn workflows into tools that can be shared with others via their built-in user management system. And for people who prefer to use their own UI, ViewComfy offers serverless API access with autoscaling.</p><p>Its enterprise features — such as SSO support and private S3 bucket integration — make it especially attractive to teams and organizations looking to empower their designers with AI in a secure and scalable way.</p><h3><a href="https://www.runcomfy.com/">RunComfy</a>: Get started right away with prebuilt workflows and an easy-to-use playground.</h3><p>RunComfy is a dedicated ComfyUI cloud platform geared toward artists and hobbyists. It provides pre-configured ComfyUI environments with zero setup, and a library of ready-to-run workflows. This makes it easy to get started or to try the latest trendy workflow.</p><p>More advanced users can access the manager to install node packs and build their own workflows. RunComfy also has a playground where users can easily access models via a more traditional app interface. This alternative to ComfyUI also includes closed-source models like Midjourney.</p><p>The pay-as-you-go plan is perfect for getting started, and their pro plan supports more advanced features like persistent storage or access to CPU machines.</p><h3><a href="https://www.runpod.io/">RunPod</a>: Cheap, fully customizable GPU instances.</h3><p>RunPod is a general-purpose cloud GPU provider rather than a ComfyUI-specific service. It offers on-demand GPU instances and a serverless API. Using RunPod for ComfyUI means setting it up yourself using JupiterLab and the terminal, or using community templates. This yields maximum flexibility and potentially lower cost, but with significantly more hands-on management.</p><p>They offer a wide range of GPUs, including the RTX series, through their pay-as-you-go system. Sessions can also be saved inside dedicated volumes that can be attached to a new GPU when needed.</p><h3><a href="https://replicate.com/">Replicate</a>: Wide range of prebuilt APIs for developers, with the option to deploy your own.</h3><p>Replicate is a platform designed to run and deploy machine learning models via API. It’s well-known for hosting a community-driven model library and for its developer-friendly API.</p><p>While Replicate wasn’t built exclusively for ComfyUI, it does support it via container templates. Using Replicate with ComfyUI means containerizing a ComfyUI workflow into their format (called Cog), then letting Replicate handle serving it on demand.</p><p>If you are a developer looking for a fully managed API with autoscaling, Replicate is a strong choice. On the flip side, unlike with other services in this list, you can’t access ComfyUI via it’s interface.</p><h3><a href="https://www.rundiffusion.com/">RunDiffusion</a>: Supports a range of open-source tools with plenty of documentation to help beginners get started.</h3><p>RunDiffusion is an AI generative platform that supports image and video generation through multiple interfaces (Automatic1111, ComfyUI, etc.).</p><p>It is a user-friendly solution, offering cloud environments to run open-source generative tools. In the context of ComfyUI, RunDiffusion provides a managed environment, and lots of educational content. This makes it easy to get started, but if you need to install specific custom nodes, it can be complicated.</p><p>RunDiffusion operates on a subscription model with tiered plans, each coming with a set amount of GPU hours. If you exceed your plan’s limit, they also have a credit system where you can purchase extra generation credits.</p><h3><a href="https://comfy.icu/">ComfyICU</a>: Run your workflows in batch over multiple GPUs.</h3><p>ComfyICU is designed for users who want to launch large-scale batch jobs without managing infrastructure. The platform requires zero setup — users don’t launch or manage machines manually — and includes a dashboard for workflow management and tracking run history.</p><p>One of ComfyICU’s strengths is its ability to parallelize tasks across multiple GPUs. While the platform restricts custom node installation, it has a wide library of preinstalled nodes and users can upload their own models.</p><p>Something unique about ComfyICU is that it operates in a shared environment with other users, meaning you may wait in a queue when sending a request, depending on your plan. For teams or enterprise users, they can offer private GPU clusters, as well as advanced analytics.</p><h3>Conclusion</h3><p>Each platform in this space serves a unique purpose. If you’re looking for maximum flexibility and control, platforms like RunPod or Replicate offer powerful solutions — provided you’re comfortable with containerization, scripting, or infrastructure setup. For individuals and enthusiasts, RunComfy and RunDiffusion offer fast ways to explore and experiment with ComfyUI workflows, while ComfyICU caters parallelized use cases.</p><p>But if you’re a studio or company aiming to turn complex workflows into intuitive tools for your team — or share them as scalable APIs without the engineering overhead — ViewComfy is built for you. It bridges the gap between flexibility and usability, making it easy to build shareable apps or endpoints from any ComfyUI workflow, while supporting the enterprise features teams depend on.</p><p>Want to turn your ComfyUI workflow into a web app or API in minutes? <a href="https://app.viewcomfy.com/">Try ViewComfy now</a> or <a href="/service/mailto:team@viewcomfy.com">get in touch</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98c6087735e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cut ComfyUI Cold Starts Times by half with ViewComfy]]></title>
            <link>https://medium.com/@guillaume.bieler/cut-comfyui-cold-starts-times-by-half-with-viewcomfy-77c6efc4d2a3?source=rss-9fecc0e3ad68------2</link>
            <guid isPermaLink="false">https://medium.com/p/77c6efc4d2a3</guid>
            <category><![CDATA[image-generation]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[flux]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Guillaume Bieler]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 15:21:36 GMT</pubDate>
            <atom:updated>2025-07-22T15:21:36.965Z</atom:updated>
            <content:encoded><![CDATA[<p>Running ComfyUI in the cloud — especially behind an API — can be frustrating due to long cold start times. Spinning up a new container often takes between 30 seconds and 2 minutes, which can lead to a poor user experience.</p><p>To solve this, <a href="https://www.viewcomfy.com/">ViewComfy</a> has introduced Memory Snapshot, a new feature that can reduce ComfyUI startup times to under 3 seconds in many cases.</p><h3>Where do cold starts come from</h3><p>Each time a new ComfyUI container launches, it goes through an extensive initialization process:</p><ul><li>Importing heavy Python libraries like torch, which alone can execute tens of thousands of syscalls</li><li>Running pre-startup tasks such as security scans on custom nodes</li><li>Initializing the server and loading potentially hundreds of custom modules</li></ul><p>On top of that, once Comfy is done starting up, it will have to load all of the models to the GPU before it can start generating, which can double total cold start time.</p><p>All of these steps contribute to significant delays — particularly noticeable when ComfyUI is serving requests through an API or an interface like a <a href="https://github.com/ViewComfy/ViewComfy">ViewComfy app</a>.</p><h3>How Memory Snapshot helps</h3><p>Memory Snapshot captures the full state of the container’s CPU memory after ComfyUI finishes its startup — but before any models are loaded or workflows are run. When a new container is needed, ViewComfy simply restores this saved memory state, bypassing the slowest parts of the startup process.</p><p>As a result, Comfy startup uptime usually drops by about 90%, to as low as 3 seconds. This can cut down total cold start times by about half when model loading times are taken into account.</p><p>This improvement is especially impactful for complex workflows that rely on multiple custom nodes or libraries.</p><h3>Learn more</h3><p>For more details on memory snapshot, including benchmarks, check out the <a href="https://www.viewcomfy.com/blog/faster-comfy-cold-starts-with-memory-snapshot">article</a> on ViewComfy’s site.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77c6efc4d2a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build and deploy a ComfyUI-powered app: A complete guide]]></title>
            <link>https://medium.com/@guillaume.bieler/build-a-comfyui-powered-app-and-integrate-it-into-your-website-or-web-app-a-complete-guide-af784a14bc57?source=rss-9fecc0e3ad68------2</link>
            <guid isPermaLink="false">https://medium.com/p/af784a14bc57</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-app-development]]></category>
            <dc:creator><![CDATA[Guillaume Bieler]]></dc:creator>
            <pubDate>Thu, 10 Apr 2025 16:53:17 GMT</pubDate>
            <atom:updated>2025-04-11T12:33:33.867Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T-g-2uvAPVW7h-HmXdjS_Q.png" /></figure><p>You’ve created the perfect ComfyUI workflow, now you are wondering how to best share it with non-technical team members or clients. This guide will go through how to do just that by deploying your own <a href="https://github.com/ViewComfy/ViewComfy?tab=readme-ov-file">ViewComfy web apps</a> on a server you manage, allowing you to create professional, embeddable AI applications that anyone can use.</p><p>To optimize the cost of running your application, we will split the application into two parts, each deployed differently. The backend, which is responsible for running the ComfyUI workflow, will be deployed on ViewComfy’s serverless infrastructure. The frontend, which consists of the ViewComfy app’s interface, will run on a Modal account that you will set up.</p><p>This solution is ideal for people who want to embed a ViewComfy app into a website or another application, or need to make significant changes to the frontend. If you want to keep it simple and need built-in user management and security features, we recommend deploying the frontend directly on ViewComfy.*</p><p><em>*This second option is currently in close beta. Please contact the team at team@viewcomfy.com for more details.</em></p><h4>Deployment strategy advantages</h4><p>There are some important advantages to splitting the application into two:</p><ul><li><strong>Cost Efficiency</strong>: By separating your frontend and backend, you can run the UI on cost-effective CPUs while only using GPUs for the actual generation tasks. For reference, a CPU on Modal costs $0.024/h, which is a fraction of the cost of running a GPU.</li><li><strong>Scalability</strong>: By using ViewComfy’s serverless API, your application will scale based on demand. With a standard setup, there won’t be any GPUs running when no one is using the app. As soon as someone clicks generate, a GPU will turn on and start working on the request. And if your application has too much traffic for one GPU to handle, more will be added to ensure your users don’t have to wait.</li><li><strong>Frontend Integration</strong>: With this strategy, you can embed your ViewComfy apps directly into your company website and/or web apps through an iframe, creating a seamless experience for your users.</li><li><strong>Opportunity for customization: </strong>By hosting the frontend on your side, you have full control over the UI and can customize it to get the look just right.</li></ul><h4>Step-by-step deployment guide</h4><ol><li><strong>Deploy your ComfyUI workflow (backend) on ViewComfy</strong></li></ol><p>First, in order to transform your ComfyUI workflow into a serverless API, you need to deploy it on <a href="http://app.viewcomfy.com/">ViewComfy Cloud</a>. This process is as simple as dropping your workflow_api file into your dashboard and selecting the GPU you want to use. You will be given the opportunity to add models, including your own custom ones, before and after deploying.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/0*_irAHHrM5m2-3ayS" /></figure><p>After deploying, you can access the deployment via the standard ComfyUI interface and make any necessary changes (e.g., installing new node packs).</p><p>Once you are done, your workflow will run on a specialized GPU of your choice and on infrastructure that will automatically scale to meet your demand. For more details on how to deploy the workflow, refer to the “Deploying your workflow” section of <a href="https://www.viewcomfy.com/blog/integrate-comfyui-workflows-into-your-apps-via-api">this</a> guide.</p><p>The important things you will need for the next steps are your API endpoint and API keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FbJ2KT3TbTA_oYIC" /></figure><p><strong>2. Creating your Viewcomfy app</strong></p><p>The next step is to create the simple UI you will expose to your users. To do that, we will use <a href="https://github.com/ViewComfy/ViewComfy">ViewComfy’s open-source app builder</a>.</p><p>The instructions for installing and using the app builder are all in the project’s ReadMe. It should only take a few minutes and doesn’t require any serious coding.</p><p>When going through this process, you will want to pay attention to the “Deploy the frontend and backend separately” section. In particular, make sure to add your endpoint to the workflow settings in the app builder:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*KBCQlNsKUmoA_t0s" /></figure><p>And to add the API keys to the .env file.</p><pre>.env file -&gt;<br>VIEWCOMFY_CLIENT_ID=&quot;&lt;your client id&gt;&quot;<br>VIEWCOMFY_CLIENT_SECRET=&quot;&lt;your client secret&gt;&quot;</pre><p>Once you are done, every time you click generate on your app, a request will be sent to your ViewComfy deployment, where it will be handled.</p><p>You can save your view_comfy.json as you will need it for the last step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/0*SqTs9fYnBAJisMhf" /></figure><p>As described in the project’s ReadMe, you can have multiple ComfyUI workflows in the same app. If you decide to do that, it is often better to have a different deployment/endpoint for each workflow. This will make your app more responsive and avoid the risk of breaking a deployment by installing conflicting nodes.</p><p><strong>3. Deploy your frontend on Modal</strong></p><p>Finally, you can deploy the frontend to make your ViewComfy app a real web app. In this example, we are using Modal to host the frontend, but you can use other alternatives like Vercel. The details on how to do that are in the <a href="https://github.com/ViewComfy/ViewComfy/tree/main/hosting-examples/modal">hosting-examples/modal</a> folder of the open-source project.</p><p>One thing you want to pay attention to is that you will need to copy your API keys to the .env file in this folder. This is because when your app is running on Modal, it will use a different .env file than when you are running the app on your computer.</p><p>Once you have your modal account set up, you can replace the view_comfy.json file in the folder with your own and deploy it using the premade script.</p><p>Modal will provide you with two URLs:</p><ul><li>The first one is a link to your application and will look like this: “<em>https://&lt;your account name&gt; — viewcomfy-modal-viewcomfy-view-comfy-web-server.modal.run/</em>” . This is the link you can embed in an iframe, for example. (Be careful with that link; anyone with access to it will be able to open your app)</li><li>The second one is a link to your deployment and will look like this: “<em>https://modal.com/apps/&lt;your account name&gt;/main/deployed/viewcomfy-modal</em>”. This is where you can see if your deployment is running and track usage. You can delete the deployment by clicking “Stop app” at the top.</li></ul><p>Every time your app is opened in a browser tab, it will automatically turn on. As previously mentioned, the app itself is running on a cheap CPU and will only send requests to the ViewComfy GPUs when you click generate.</p><h4><strong>Embedding your ViewComfy app in your website</strong></h4><p>This part is optional; you can easily embed your app directly into your website or web app using an iframe and the link from the previous step:</p><pre>&lt;iframe<br>src=&quot;https://&lt;your account name&gt; - viewcomfy-modal-viewcomfy-view-comfy-web-server.modal.run&quot;<br>width=&quot;100%&quot;<br>height=&quot;100%&quot;<br>frameborder=&quot;0&quot;<br>&lt;/iframe&gt;</pre><h4>Changing your app’s style</h4><p>If you are comfortable with Next.js and Tailwind, adapting the app’s styling and making it your own should be relatively straightforward. You can fork the open-source project and work from there directly.</p><p>To deploy your custom app, simply follow the same steps outlined above. The only adjustment necessary is to update the <em>run_commands</em> function in <em>hosting-examples/modal/view_comfy.py</em> to refer to your version of ViewComfy rather than the default version.</p><pre>.run_commands(<br>&quot;mkdir -p /app&quot;,<br>&quot;cd /app &amp;&amp; git init .&quot;,<br>&quot;cd /app &amp;&amp; git remote add origin &lt;link to your github repo&gt;&quot;,<br>…<br>)</pre><h4>Conclusion</h4><p>This guide helps you transform a ComfyUI workflow from a technical tool to a web application that anyone can use. The combination of ViewComfy’s serverless GPU infrastructure for processing and Modal’s cheap CPUs for the front end makes it possible to build a cheap and scalable solution with (almost) no code.</p><p>If you need a full end-to-end solution with built-in user management and security features, we recommend using ViewComfy’s frontend deployment solution instead of deploying directly on Modal.*</p><p><em>*This second option is currently in close beta. Please contact the team at team@viewcomfy.com for more details.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af784a14bc57" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Speed up ComfyUI Image and Video generation with TeaCache]]></title>
            <link>https://medium.com/@guillaume.bieler/speed-up-comfyui-image-and-video-generation-with-teacache-4409fac3def9?source=rss-9fecc0e3ad68------2</link>
            <guid isPermaLink="false">https://medium.com/p/4409fac3def9</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[image-generation]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[video-generation]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <dc:creator><![CDATA[Guillaume Bieler]]></dc:creator>
            <pubDate>Fri, 28 Mar 2025 17:44:08 GMT</pubDate>
            <atom:updated>2025-04-03T11:11:52.740Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A_247d4YrVnANmo-cS-3YQ.png" /></figure><p>One of the biggest problems when generating images or videos is how slow the process can be. Fortunately, we now have a few good tricks to help speed up generation. In this post, we’ll go over our preferred solution when using ComfyUI: TeaCache and model compiling. During testing, we managed to speed up generation time by 3X with FLUX and 2.8X with Wan2.1 with no loss in quality.</p><p>Without going into the details, TeaCache uses clever caching to take advantage of the fact that the output of many of the attention blocks inside diffusion models is very similar to their input. While model compiling speeds up inference by optimizing the model’s code. The great thing is that both of those techniques work out of the box with any ComfyUI workflow.</p><h4>Performance improvement</h4><p>TeaCache really feels like a free lunch and is perfect for speeding up API inference and ComfyUI workloads in general. However, model compiling has an important drawback that should be mentioned before we start: the first 2 to 3 generations of every session are much slower. This can make it hard to use effectively when running ComfyUI as an API unless servers are running for extended periods of time.</p><p>We ran a few tests on Flux Dev and Wan2.1 text to video to quantify the performance gains:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*b8_Vj2sYrOTOufzyup4-iA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*BY_6QbFmvjH2InGVh5VJfQ.png" /></figure><p>As you can see, TeaCache on its own roughly halves the generation time with Flux and Wan2.1. And when combined with model compiling, you are looking at 2.5X to 3X speed improvements.</p><h4>Utilisation</h4><p>The TeaCache node from the ComfyUI-TeaCache node pack comes with two parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/0*2-obIzuQg5Rarj9K.png" /></figure><p>The first one, rel_l1_thresh, controls how often the cache will be refreshed. At 0 it is turned off, while at higher values, the cache is refreshed more often. The other parameter, max_skip_steps, sets the maximum number of steps that the cached memory can skip.</p><p>The higher those values, the faster the generation will be. That said, we found during testing that at values higher than 0.4 / 3 for Flux and 0.2 / 3 for Wan2.1, generations started losing some details.</p><p>Here are some examples using Flux Dev with different threshold values and skip steps 3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*gkdWw2dO1Ch3LB7O.png" /></figure><p>And again with Wan2.1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*x8T8pLKeePgY3155.gif" /></figure><p>As you can see, with Flux, results hardly change between 0 and 0.4 and start losing quality after that. While with Wan, results tend to be a lot more sensitive to the threshold. We found that 0.2 gave good results, like in the example above.</p><h4>Installation</h4><p>All you have to do to use these techniques is to install <a href="https://github.com/welltop-cn/ComfyUI-TeaCache/tree/main">this</a> node pack, and add the TeaCache and/or the Compile Model nodes after loading the diffusion model (if you are using LoRAs, the TeaCache node will go after the Load LoRA node)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*bJW2gnJqvRFlt0TV.png" /></figure><p>For a quick start, we’ve set up a template with everything you need to get started using TeaCache with Flux on <a href="https://app.viewcomfy.com/">ViewComfy</a>. You can also use the Wan2.1 template and install ComfyUI-TeaCache to skip the model installation and run the model on Cloud GPUs. Both those templates work out of the box with ViewComfy’s serverless API and can easily be integrated into applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4409fac3def9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making extra long AI videos with Hunyuan Image to Video and RIFLEx]]></title>
            <link>https://medium.com/@guillaume.bieler/making-extra-long-ai-videos-with-hunyuan-image-to-video-and-riflex-251e61723f5f?source=rss-9fecc0e3ad68------2</link>
            <guid isPermaLink="false">https://medium.com/p/251e61723f5f</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[image-to-video]]></category>
            <category><![CDATA[hunyuanvideo]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <dc:creator><![CDATA[Guillaume Bieler]]></dc:creator>
            <pubDate>Fri, 21 Mar 2025 19:42:15 GMT</pubDate>
            <atom:updated>2025-06-02T09:29:15.182Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lsszey8IwpftMn1FBVFwSw.png" /></figure><p>It feels like 2025 is finally going to be the year when AI will enter the world of Video. We already made a <a href="https://www.viewcomfy.com/blog/comparing-image-to-video-models-in-comfyui-skyreels-v1-vs-wan-21">post</a> a few weeks ago about two promising models (Wan 2.1 and SkyReels), but Tencent decided they were going to treat us with another best in class model for image to video. In this guide, we will go over how to use the native ComfyUI setup for Hunyuan Image2Video with <a href="https://github.com/thu-ml/RIFLEx">RIFLEx</a>. This addition allows us to generate videos that are longer than the usual 129 frames (5 seconds) the model was trained on.</p><h4><strong>Results comparison with and without RIFLEx</strong></h4><p>Before we get into the details of the workflow, these are the results we got generating a 193 frame video, with and without RIFLEx. (<a href="http://other_resources/RIFLEx_test/riflex%20test.mp4">720p version</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*77oh3JoSIAkN2YgdJY7pQw.gif" /></figure><p>As you can see, the RIFLEx helps prevent the video from going into a loop when going over the usual 129 frames recommended limit. It also makes it less likely that the model generates artefacts in longer videos.</p><h4><strong>Quick start</strong></h4><p>If you are looking for a quick start with no installation, you can deploy the template we used in this tutorial <a href="https://app.viewcomfy.com/">here</a>. We recommend using an H100 for optimal performance, as this is a heavy workflow. After two or three minutes, you should be able to access the workflow via the ComfyUI interface, or via API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D0pwN10uJs4S2LFL" /></figure><p>To open the ComfyUI interface, click on the ComfyUI link. Please note that the initial loading time may take a few minutes. Once the interface is ready, you drop <a href="http://workflows/hunyuan_img2vid/workflow.json">this</a> workflow to get started.</p><h4><strong>Key workflow parameters</strong></h4><p>In this section, we will go over the important parameters to get the most out of this workflow.</p><p><strong>Load Image</strong></p><p>This is the image the workflow will use to generate the video’s first frame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/0*mtcK-R04KU7gILH0" /></figure><p><strong>Text Encode Hunyuan Video</strong></p><p>This is your usual text prompt. Here, we were using the Flat Color LoRA from Civit AI and had a prompt tailored to work with that LoRA. In general, you can stick to a short description of what you are targeting followed by a few esthetic tags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/0*3kwP6imZoFp0mOdq" /></figure><p><strong>Hunyuan Image To Video</strong></p><p>This node allows you to set the width and height of the video the workflow will generate. The length is the number of frames. With RIFLEx, you can go up to 257 frames, while without it, it is usually recommended to stay below 129.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/0*eenEsfG35vBwlhny" /></figure><p><strong>Lora Loader Model Only</strong></p><p>We’ve added the option to add LoRAs to the workflow. You can select loRAs from the ComfyUI loras folder here (for people using the template, <a href="https://youtu.be/sRticjuabVQ">here</a> is a guide on how to add new LoRAs). The strength is a measure of how much the LoRA will impact the generation. At 0 the LoRA will be ignored, and at 1 it will be at its maximum strength.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/0*C4dRYsUZnnxHj03E" /></figure><p><strong>Random Noise</strong></p><p>Without going into the technical details, the seed is the random part of GenAI. Set it to randomize if you want the workflow to make a completely new output each time. You can also fix it if you find a seed that works well with your other parameters, this will make the results more consistent.</p><p>One thing that is good to keep in mind is that the seed has a huge impact on the quality of the current generation of video models. If you are not happy with the results, changing the seed might solve the problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/0*JyVQrvsHZm86Oz4z" /></figure><p><strong>Video Combine</strong></p><p>This node combines all the generated frames into a video. The key parameters are the frame rate and the video format. Sometimes, Hunyuan generates very slow or very fast videos. Adjusting the frame rate is a good way to adjust the speed without having to regenerate from scratch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/0*YqUk71DwBqogiJjI" /></figure><p>And that is all you need to get great results with Hunyuan Video. If you want to get updates on new templates and guides, you can follow us on <a href="https://x.com/ViewComfy">Twitter/X</a> or join our <a href="https://discord.gg/7XQmdnNkvd">discord</a>.</p><p>You can also upload your own workflow to<a href="https://app.viewcomfy.com/"> ViewComfy cloud</a> and access it via the ComfyUI interface or an API.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=251e61723f5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrate ComfyUI Workflows into your apps via serverless APIs: A Guide to ViewComfy]]></title>
            <link>https://medium.com/@guillaume.bieler/integrate-comfyui-workflows-into-your-apps-a-guide-to-the-viewcomfy-api-981319b16c66?source=rss-9fecc0e3ad68------2</link>
            <guid isPermaLink="false">https://medium.com/p/981319b16c66</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Guillaume Bieler]]></dc:creator>
            <pubDate>Wed, 12 Mar 2025 08:48:49 GMT</pubDate>
            <atom:updated>2025-06-02T09:29:34.933Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*eCLn5FDfa4G0nFDId7drKw.jpeg" /></figure><p>This guide goes over all the steps to integrate a ComfyUI workflow into a Python or TypeScript application via the <a href="https://www.viewcomfy.com/deploy-comfyui">ViewComfy </a>API. The first section will go over the details of deploying the workflow and turning it into a serverless API. This should only take a few minutes with the ViewComfy dashboard. We will then go over how to call the API and make the integration.</p><h4>Deploying your workflow</h4><p>The first thing you will need to do is to deploy your ComfyUI workflow. In this example, we will deploy a custom workflow. You could also deploy a template from ViewComfy, which can be quicker if you find the right one.</p><p>Once you have the workflow_api.json for the workflow you want to deploy, you can head to the <a href="https://app.viewcomfy.com/">ViewComfy dashboard</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*fjzC-Y5HqGascYqqblM-Ng.png" /></figure><p>After selecting “Deploy your own”, you will have the option to choose the GPU you want to run your workflow on. You can then name your deployment and drop your workflow_api.json file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*4EclYTUWE_iFw-uxFY_gHg.png" /></figure><p>Once everything is ready, you can click “Deploy”. The system will go through your workflow and install all the nodes you need to run it. It will also go through the models and download the ones from this <a href="https://github.com/ViewComfy/cloud-public/blob/main/supported_weights.md">list</a> automatically. If some models are missing from the list, no worries, you can add them before deploying using the “Add a model” button. You will also have the option to add new models once the deployment is live. For more info on how to add models, you can refer to <a href="https://youtu.be/sRticjuabVQ">this</a> guide.</p><p>Depending on how many models the system has to download, it usually takes between 5 to 30 min to get your deployment ready. In some cases, like if you need to download the full Flux model family, it can take longer.</p><p>Once your workflow is deployed, you will be able to access it via the dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K6fJMGWVo3Esp0loY6mdSg.png" /></figure><p>You can make sure that everything was installed properly by clicking on the “ComfyUI” link and testing your workflow via the usual Comfy interface*. If you need to install new nodes, you can use the Comfy Manager in the same way you would locally. And if you want to add new models, you can use the “add a model” button on the dashboard.</p><p>Once everything is in place, you can start integrating the API using the “API endpoint” link from the dashboard.</p><p><em>*note that sometimes the workflow does not load in the UI automatically. If that happens, you can just drop it in the Comfy interface as you would normally do</em></p><h4>Calling the workflow with the API</h4><p>The ViewComfy API is a REST API that can be called with a standard POST request but also supports streaming responses via Server-Sent Events. This second option allows for real-time tracking of the ComfyUI logs. In this guide, we will go over how to call the API with the streaming response.</p><p>All the code you need to run the API can be found in <a href="https://github.com/ViewComfy/cloud-public/tree/main/ViewComfy_API/Python">this</a> GitHub folder (this guide uses the Python example code, you can access the TypeScript example code <a href="https://github.com/ViewComfy/cloud-public/tree/main/ViewComfy_API/Node-TypeScript">here</a>. It works in the same way.) After downloading all the files, you can install the dependencies:</p><pre>pip install -r requirements.txt</pre><p>For the rest of the examples, we will use the Wan 2.1 image-to-video template from ViewComfy. You can deploy it from your dashboard if you want to follow along.</p><ol><li><strong>Getting your API keys</strong></li></ol><p>In order to use your API endpoint, you will first need to create your API keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O0fTB-MvH-p2t7ORtw2vIg.png" /></figure><p>After opening the API key menu from your dashboard, you can copy your “Client ID” and “Client Secret”. Keep them somewhere safe as you will need them to call the API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*OcFXfAjFN4ptCTNh98lLjg.png" /></figure><p><strong>2. Extracting your workflow parameters</strong></p><p>The first thing to do before setting up the request is to identify the parameters in your workflow. This is done by using workflow_parameters_maker.py to flatten your workflow_api.json. You can run the script directly from your terminal:</p><pre>python workflow_parameters_maker.py --workflow_api_path &quot;&lt;Path to your workflow_api.json file&gt;&quot;</pre><p>The flattened json file should look like this:</p><pre>{<br>    &quot;_3-node-class_type-info&quot;: &quot;KSampler&quot;,<br>    &quot;3-inputs-cfg&quot;: 6,<br><br>    …<br><br>    &quot;_6-node-class_type-info&quot;: &quot;CLIP Text Encode (Positive Prompt)&quot;,<br>    &quot;6-inputs-clip&quot;: [<br>        &quot;38&quot;,<br>        0<br>    ],<br>    &quot;6-inputs-text&quot;: &quot;A woman raising her head with hair blowing in the wind&quot;,<br><br>    …<br><br>    &quot;_52-node-class_type-info&quot;: &quot;Load Image&quot;,<br>    &quot;52-inputs-image&quot;: &quot;&lt;path_to_my_image&gt;&quot;,<br><br>    …<br><br>}</pre><p>This dictionary contains all the parameters in your workflow. The key for each parameter contains the node id from your workflow_api.json file, whether it is an input, and the parameter’s input name. Keys that start with “_” are just there to give you context on the node corresponding to id, they are not parameters.</p><p>In this example, the first key-value pair shows that node 3 is the KSampler and that “3-inputs-cfg” sets its corresponding cfg value.</p><p><strong>3. Updating the script with your parameter</strong></p><p>All the code you will need to call the API, parse the results and save the outputs are in main.py and api.py. In most cases, the only file you will need to edit is main.py. This is where you will add the parameters you want to change, your API endpoint, and the directory to save your outputs.</p><p>The first thing to do is to copy the ViewComfy endpoint from your dashboard and set it to view_comfy_api_url. You should also get the “Client ID” and “Client Secret” you made earlier, and set the client_id and client_secret values:</p><pre>view_comfy_api_url = &quot;&lt;Your_ViewComfy_endpoint&gt;&quot;<br>client_id = &quot;&lt;Your_ViewComfy_client_id&gt;&quot;<br>client_secret = &quot;&lt;Your_ViewComfy_client_secret&gt;&quot;</pre><p>You can then set the parameters using the keys from the json file you created in the previous step. In this example, we will change the prompt and the input image:</p><pre>params = {}<br>params[&quot;6-inputs-text&quot;] = &quot;A flamingo dancing on top of a server in a pink universe, masterpiece, best quality, very aesthetic&quot;<br>params[&quot;52-inputs-image&quot;] = open(&quot;/home/gbieler/GitHub/API_tests/input_img.png&quot;, &quot;rb&quot;)</pre><p><strong>4. Calling the API</strong></p><p>Once you are done adding your parameters to main.py, you can call the API by running:</p><pre>python main.py</pre><p>This will send your parameters to api.py where all the functions to call the API and handle the outputs are stored.</p><p>By default the script runs the “infer_with_logs” function which returns the generation logs from ComfyUI via a streaming response. If you would rather call the API via a standard POST request, you can use “infer” instead, like so:</p><pre>  # Call the API and wait for the results<br>    prompt_result = await infer(api_url=view_comfy_api_url, params=params, override_workflow_api=override_workflow_api)<br>  <br>...<br><br>  # prompt_result = await infer_with_logs(<br>  #     api_url=view_comfy_api_url,<br>  #     params=params,<br>  #     logging_callback=logging_callback,<br>  #     override_workflow_api=override_workflow_api<br>  # )</pre><p>The result object returned by the API will contain the workflow outputs as well as the generation details. It is formatted as follows (For the full definition you can refer to “PromptResult” inside api.py.):</p><pre>prompt_id (str): Unique identifier for the prompt<br>status (str): Current status of the prompt execution<br>completed (bool): Whether the prompt execution is complete<br>execution_time_seconds (float): Time taken to execute the prompt<br>prompt (Dict): The original prompt configuration<br>outputs (List[Dict], optional): List of output file data. Defaults to empty list.</pre><p>Your outputs will automatically be saved in your working directory.</p><h4>Editing the workflow</h4><p>So far we’ve seen how to make an API request to the workflow you uploaded when deploying. In this section, we will go over how to make a request using a different workflow. This approach will work with any workflow that can run on your deployment, so make sure you have installed all nodes and models you need to run the new workflow. (see the “Deploy your workflow” section for information on how to install new nodes and models to a deployment)</p><p>The first step is to extract the workflow_api.json file for the new workflow. In this case, I will use <a href="https://github.com/ViewComfy/cloud-public/blob/main/ViewComfy_API/example_workflow/wan_workflow_api_with_lora.json">this</a> file, which is my Wan 2.1 workflow with the addition of a LoRA. You can then add the path to the new workflow_api.json file to “override_workflow_api”:</p><pre>override_workflow_api_path = &quot;&lt;path_to_your_new_workflow_api_file&gt;&quot;</pre><p>From that point onward, you can follow the steps from the previous section to get the parameters from the workflow and make the API call.</p><h4><strong>Conclusion</strong></h4><p>ViewComfy provides a quick and flexible way to convert any ComfyUI workflow into an API. You can manage all of your deployments, edit them and add new models directly from the dashboard. They also come with a production-ready and scalable API out of the box.</p><p>Using the example code from <a href="https://github.com/ViewComfy/cloud-public/tree/main/ViewComfy_API">this</a> repo, you can quickly integrate the API into your Python and TypeScript applications.</p><p><em>Have questions or want to share your implementation? Join the discussion on our </em><a href="https://discord.gg/7XQmdnNkvd"><em>discord</em></a><em> or reach out to the team team@viewcomfy.com.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=981319b16c66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Comparing Image to Video models in ComfyUI: SkyReels V1 vs Wan 2.1]]></title>
            <link>https://medium.com/@guillaume.bieler/comparing-image-to-video-models-in-comfyui-skyreels-v1-vs-wan-2-1-c3d015b0a4f1?source=rss-9fecc0e3ad68------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3d015b0a4f1</guid>
            <category><![CDATA[image-to-video]]></category>
            <category><![CDATA[ai-model]]></category>
            <category><![CDATA[open-source-ai]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <category><![CDATA[text-to-video]]></category>
            <dc:creator><![CDATA[Guillaume Bieler]]></dc:creator>
            <pubDate>Thu, 27 Feb 2025 17:31:26 GMT</pubDate>
            <atom:updated>2025-02-27T17:32:49.707Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B8S8YkN2jgk1GDDDqpLukQ.gif" /></figure><p>This week has seen a lot of action in the GenAI video space with the release of multiple state-of-the-art models. In this post, I compare two of the most promising open source video models: Skyreels V1 and Wan 2.1. Both trained for Text to Video and Image to Video</p><p>All my results in the video above are for Image to Video and, with the exception of the Wan-Ballerina, are first or second shot generation. For some reason Wan kept adding disco lights to that clip.</p><p>When making the infographic, I tried to be as scientific as possible and compared videos of the same lengths. This does not give full justice to Wan, which could easily produce longer clips. Skyreels on the other hand was struggling to make coherent videos that were any longer than that.</p><p>From a quality standpoint, I felt like both videos were comparable when it came to making realistic people, but Wan felt better for other styles.</p><p>I ran all my tests on a H100 using basic workflows for both models. In terms of hardware requirements and speed, Skyreels performed better. To put things in numbers:</p><ul><li>Skyreels: 2.73 seconds per frame with 31GB of VRAM</li><li>Wan: 2.96 seconds per frame with 37GB of VRAM</li></ul><p>If you want to try out those models inside ComfyUI, or access them via an API, we’ve set up some ready-to-use templates on <a href="https://www.viewcomfy.com/">ViewComfy</a>. (click on “deploy a workflow” on the top right when you are there. If the workflow is not already loaded when you open Comfy, you can drop the ones I linked below)</p><p>The workflows I used for testing:</p><ul><li>Skyreels: <a href="https://huggingface.co/Kijai/SkyReels-V1-Hunyuan_comfy/resolve/main/skyreels_hunyuan_I2V_native_example_01.json">https://huggingface.co/Kijai/SkyReels-V1-Hunyuan_comfy/resolve/main/skyreels_hunyuan_I2V_native_example_01.json</a></li><li>Wan: <a href="https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/tree/main/example%20workflows_Wan2.1">https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/tree/main/example%20workflows_Wan2.1</a></li></ul><p>Original model repos:</p><ul><li>SkyReels: <a href="https://github.com/SkyworkAI/SkyReels-V1">https://github.com/SkyworkAI/SkyReels-V1</a></li><li>Wan: <a href="https://github.com/Wan-Video/Wan2.1">https://github.com/Wan-Video/Wan2.1</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3d015b0a4f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Image to Image Face Swap with Flux-PuLID II]]></title>
            <link>https://medium.com/@guillaume.bieler/image-to-image-face-swap-with-flux-pulid-ii-d6f601f8b5db?source=rss-9fecc0e3ad68------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6f601f8b5db</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[flux]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <category><![CDATA[ai-art]]></category>
            <dc:creator><![CDATA[Guillaume Bieler]]></dc:creator>
            <pubDate>Mon, 10 Feb 2025 11:15:54 GMT</pubDate>
            <atom:updated>2025-02-10T11:15:54.758Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*jo8CciKjUbzklxcYm2eyMg.png" /></figure><p>This workflow takes advantage of<a href="https://github.com/lldacing/ComfyUI_PuLID_Flux_ll"> lldacing PuLID II</a> custom nodes, which brings new improvements to PuLID. Starting with a portrait of a character, you can face swap with a target image keeping the details consistent between the generated image and the target. This technique is particularly effective for placing your character into an image with a desired composition.</p><p>The quickest way to get started is to deploy the template <a href="https://app.viewcomfy.com/">here</a>. For optimal performance, we recommend running this workflow on an A100, but it will also work on an L4 (24 GB VRAM). Your template should be ready in approximately one minute. Afterwards, you can access the workflow using the ComfyUI interface, an API endpoint, or a ViewComfy app. This guide will utilize the ComfyUI interface; however, the principles remain consistent across all three options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5hMVJmXqBcishf5Wdyi3g.png" /></figure><p>To open the ComfyUI interface, click on the ComfyUI link. Please note that the initial loading time may take a few minutes. Once the interface is ready, you can drag and drop this image to load the workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MlnUUuaNl-L2EygdLlFmuw.png" /></figure><p>You can ignore most of the parameters in this workflow. We will go through all the important ones in the following section.</p><p><strong>Load Character Image</strong></p><p>This should be a well-lit portrait of your character.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*7ZYxGTjMrucs1BVj78hWyQ.png" /></figure><p><strong>Load image for img2img</strong></p><p>This is the image that will be used as the target for the face swap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*XkzoGUbNUCvPy3I7eWESSA.png" /></figure><p><strong>Text prompt</strong></p><p>Describe what the final image should look like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*v2kiGK23PaBWIjQ2oQF0sA.png" /></figure><p><strong>Load LoRA</strong></p><p>You can load loRAs to help with the generation using this node. In this example, we are using a loRA to add details, which tends to make the generated image look more realistic.</p><p>You can increase the strength_model parameter to make the loRA stronger and increase its influence on the generation process. This parameter can take any value between 0 and 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*K4R-OjiGFgdSfHZTaDlyog.png" /></figure><p><strong>Denoise</strong></p><p>The denoise is by how much the target image will change. This workflow works best with values around 0.6. You can increase it slightly if you feel like the results don’t look enough like your character, but keep in mind that it might affect how much of the other details in the target image are retained.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*EkwQFjdOhNUzsXosCKZhLw.png" /></figure><p>And that is all you need to get great results with this state-of-the-art face-swapping technique.</p><p>You can also upload your own workflow to<a href="https://app.viewcomfy.com/"> ViewComfy cloud</a> and access it via the ComfyUI interface or an API.</p><p><strong>Acknowledgements</strong></p><p>A word of acknowledgement to Tenofas for coming up with the original workflow this one is inspired on.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6f601f8b5db" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>