XLabs-AI / x-flux

Apache License 2.0
1.59k stars 114 forks source link

Question about LoRA file identification and usage #29

Open WarriorMama777 opened 2 months ago

WarriorMama777 commented 2 months ago

Question about LoRA file identification and usage

Context

I've successfully trained a LoRA model using this repository. However, I'm unsure about which file to use for inference and how to prepare it for use in tools like ComfyUI.

Training Output

After training, I found the following files in the output directory:

Questions

  1. Identification of LoRA weights file:

    • Which file contains the actual LoRA weights that should be used for inference?
    • Is it the lora.bin file, or should I be looking at a different file?
  2. Usage in inference tools:

    • How can I prepare the LoRA weights file for use in tools like ComfyUI?
    • Is any conversion necessary (e.g., to .safetensors format)?
    • If conversion is needed, could you provide steps or point me to relevant documentation?
  3. Clarification on large checkpoint file:

    • What is the purpose of the large mp_rank_00_model_states.pt file?
    • Is this file necessary for using the trained LoRA, or can it be safely ignored for inference?

Thank you in advance for your help in clarifying these points.

bghira commented 2 months ago

when you say success, what do you refer to? it sounds like you've not gotten around to testing it yet?

lora.bin is a pytorch pickle file containing the lora weights. not sure why they didn't use safetensors.

i think you have to send a copy of this file to Comfy for him to add support to CUI.