Sign In

Lazy tutorial | How to use Flux on Colab | FREE by:: mikus (silly and easy)

2

Lazy tutorial | How to use Flux on Colab | FREE by:: mikus (silly and easy)

WARNING!

I’m not very experienced in this matter, so I recommend first learning all the functionality and reading a few more tutorials on how to do it!

Flux URL:

Flux <- click

my Github | Github Original <--

1. Launch and Set Up the Environment

  1. In the first section "Start 💕", click the run button to install all necessary libraries and clone "ComfyUI".


2. Using LoRA and Flux Models ✨

  1. Navigate to the "LoRA and Flux Models ✨" section.

  2. Fill in the following parameters:

    • model_repo: Enter the name of the Hugging Face repository from which the model will be loaded.

    • lora_model: Enter the name of the LoRA model from Hugging Face that you want to use.

    • priv (optional): Check this box if the model/LoRA is private.

    • hf_token (optional): Enter your Hugging Face token if you are using private models.

    • gdrive (optional): Enable this option if you want to automatically save generated images to Google Drive. (After activating the gdrive button, the code will automatically create the silly-image-flux folder)

Example:

  • Repository: camenduru/FLUX.1-dev

  • LoRA: flux_realism_lora

Hugging Face URL for this model:
https://huggingface.co/camenduru/FLUX.1-dev/blob/main/flux_realism_lora.safetensors

Use the "LoRA and Flux Models" button to activate Gradio


3. Downloading Images

  1. If you did not activate Gdrive, use the "Download image 🖼" button.

  2. Enter the folder path for downloading images in the output_dir field.


4. Obtaining a Hugging Face Token

If you are using private models, you need to obtain a token:

  1. Go to Hugging Face.

  2. Log in or sign up.

  3. Click "Create New token".

  4. In the Role field, select Write or Read (for downloading models, Read is sufficient).

  5. Click "Create Token" and copy the token.

  6. Paste the token into the hf_token field in Colab.


2

Comments