Flux.1 Model Installation and Usage Guide - ArataAI/anylanguage GitHub Wiki

Prerequisites

You need a Windows PC equipped with a 20, 30, or 40 series Nvidia GPU or a corresponding professional GPU accelerator.

1. Flux Model Performance Comparison

  1. Flux Pro

    • Performance: The top-tier model with the strongest processing capabilities.
    • Usage: Only accessible via API.
  2. Flux Dev

    • Performance: An open-source version derived from Flux Pro, with quality and performance close to Flux Pro.
    • Usage: Open-source, but not for commercial use.
  3. Flux Schnell

    • Performance: A distilled model processed in four steps, with processing speed 10 times faster than Flux Dev.
    • License: Released under Apache 2.0 license.

2. Download and Set Up ComfyUI

  1. Download the Latest Version of ComfyUI
    • Please visit the latest ComfyUI version page to download the latest version.
    • After downloading, extract the files for later use.

3. Download Flux Models

  1. FLUX.1 [dev]

    • Description: The official full-featured version, requiring a minimum of 24GB of VRAM.
    • Download link: FLUX.1-dev
  2. FLUX.1 [dev] fp8

    • Description: An optimized version suitable for setups with more than 12GB of VRAM.
    • Download link: FLUX.1-dev-fp8
  3. FLUX.1 [schnell]

    • Description: A distilled model processed in four steps, compatible with most GPUs.
    • Download link: FLUX.1-schnell
  4. FLUX.1 [schnell] fp8

    • Description: An optimized version suitable for lower-end GPU setups.
    • Download link: FLUX.1-schnell-fp8
  • Note: Place the downloaded model files in the ComfyUI/models/unet/ directory.

4. Download CLIP Models

  1. t5xxl_fp16.safetensors or t5xxl_fp8_e4m3fn.safetensors

    • Recommendation: Choose the fp16 version if you have more than 32GB of VRAM; otherwise, choose the fp8 version.
    • Download link: Download CLIP models
  2. clip_l.safetensors

    • Storage location: Place the file in the ComfyUI/models/clip/ directory.

5. Download VAE Models

  1. Download VAE Model
    • Download link: Download VAE model
    • Storage location: Save the downloaded file in the ComfyUI/models/vae/ directory.

6. Download the AnyLanguage Plugin

  1. Download AnyLanguage Plugin
    • Download link: AnyLanguage Plugin
    • Installation: Place the downloaded anylanguage.py file in the ComfyUI/custom_nodes directory.

7. Usage Guide

  1. Run ComfyUI

    • Run the run_nvidia_gpu.bat file to start ComfyUI. The system will automatically open a browser window.
  2. Load Models

    • You can find related examples via the following link: Flux.1 Examples
    • If you are using the Flux Dev model, drag the flux_dev_example.png image into the browser.

flux_dev_example

  • If you are using the Flux Schnell model, drag the flux_schnell_example.png image into the browser.

flux_schnell_example

  1. Plugin Configuration

    • Remove the default CLIP Text Encode (Prompt) plugin.
    • Right-click in the UI and select Add Node -> conditioning -> multilanguage prompt. This plugin will replace the default CLIP Text Encode (Prompt) plugin, with the same connection method.
  2. AnyLanguage Plugin Configuration

    • API URL: The default is OpenAI's API address https://api.openai.com/v1/chat/completions. If you have another forwarding address, you can modify it.
    • API Key: Enter the API Key obtained from OpenAI (mandatory). Apply for an API Key
    • Model: The default model is gpt-4o-mini, which can usually be kept as is.
    • Translate: Toggle the AI translation feature on or off. If turned off, you need to enter the prompt in English in the text box below.
  3. Generate Images

    • You can generate images in Japanese, Chinese, Korean, or any other language.