Model Card for Flux Dev FP8 Pipeline

This diffusers pipeline is a complete implementation of the Flux Dev 1 model optimized for FP8 precision, specifically designed for deployment on AWS SageMaker for integration with ComfyUI through a custom node. Unlike a model-only repository, this contains the full pipeline architecture required for proper deployment.

Model Details

Pipeline Description

This repository contains a complete diffusers pipeline implementation utilizing the Flux Dev 1 model optimized for FP8 precision. Unlike model-only repositories, this provides the entire pipeline architecture required for text-to-image generation, properly structured for SageMaker deployment and ComfyUI integration.

The pipeline was created to address the lack of publicly available FP8 Flux Dev implementations suitable for deployment, as standard approaches to model loading create symlink issues that prevent proper SageMaker packaging.

  • Developed by: Jlonge4
  • Pipeline type: Complete Text-to-Image Diffusion Pipeline (FP8 Optimized)
  • Model component: Flux Dev 1 quantized to FP8
  • License: Same as original Flux Dev 1 model
  • Base model: Comfy-Org/flux1-dev

Model Sources

Uses

Direct Use

This model is designed to be deployed as a SageMaker endpoint and accessed through a custom ComfyUI node. It enables text-to-image generation directly within ComfyUI workflows, leveraging the performance benefits of FP8 precision and AWS's infrastructure.

Primary use cases include:

  • Text-to-image generation within ComfyUI
  • Faster inference for Flux Dev 1 model
  • Integration with existing ComfyUI workflows

Downstream Use

The model can be integrated into larger creative pipelines within ComfyUI, serving as the text-to-image generation component that can be combined with other image processing and enhancement nodes.

Out-of-Scope Use

This model is not designed for:

  • Deployment outside of AWS SageMaker
  • Use cases requiring precision higher than FP8
  • Applications requiring inference time longer than SageMaker's 60-second timeout

Recommendations

  • Deploy on recommended g5.8xlarge instances for optimal performance
  • Design prompts considering the 60-second inference timeout limitation
  • Monitor inference performance and quality to identify any precision-related issues
  • Follow best practices for prompt engineering with Flux models

How to Get Started with the Pipeline

Deployment on SageMaker

  1. Clone the repository: ComfyUI Sagemaker Node
  2. Run the deploy_flux_dev-pipe.ipynb notebook to deploy the model to SageMaker
  3. Use a g5.8xlarge instance for deployment (recommended)

Integration with ComfyUI

ComfyUI Sagemaker Node repo

  1. Install the SageMaker custom node in your ComfyUI environment
  2. Find the "Text2Image" node in the node browser
  3. Connect the node to your workflow, providing a text prompt and optional parameters
  4. The node will communicate with your SageMaker endpoint to generate images

Factors

  • Generation quality compared to original model
  • Inference speed
  • Memory usage
  • Deployment reliability on SageMaker

Technical Specifications

Model Architecture and Objective

This model uses the same architecture as Flux Dev 1 but operates at FP8 precision. It addresses specific technical challenges:

  1. Standard HuggingFace diffusers from_single_file download creates symlinks that render the model.tar.gz unusable for SageMaker deployment
  2. A complete custom pipeline was created to properly package the model for SageMaker
  3. Special handling for FP8 precision throughout the pipeline ensures optimal performance

Compute Infrastructure

Hardware

  • Recommended: AWS g5.8xlarge GPU instance
  • Minimum: GPU with 16GB+ VRAM supporting FP8 operations

Software

  • AWS SageMaker
  • HuggingFace Diffusers
  • ComfyUI with custom SageMaker node

More Information

This complete pipeline implementation was specifically created to address the challenges of deploying Flux Dev 1 to SageMaker in FP8 format for ComfyUI integration.

Key innovations include:

  1. Full pipeline structure with all necessary components properly organized for SageMaker deployment
  2. Avoids symlink issues that would typically occur when using HuggingFace's from_single_file download option
  3. Proper packaging methodology that ensures the model.tar.gz works correctly when deployed as an endpoint
  4. Complete integration with SageMaker endpoint infrastructure through the ComfyUI custom node

For updates and improvements, check the repository at Jlonge4/flux-dev-fp8.

Model Card Contact

For questions or issues regarding this model, please open an issue on the HuggingFace repository.

Downloads last month
8
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.