flymy-ai/flux-dev-anne-hathaway-lora
LORA FLUX.1-dev example
Lora for FLUX.1-dev
ohwx woman trigger word required
๐ About FlyMy.AI
Agentic Infra for GenAI. FlyMy.AI is a B2B infrastructure for building and running GenAI Media agents.
๐ Useful Links:
- ๐ Official Website
- ๐ Documentation
- ๐ฌ Discord Community
- ๐ค LoRA Training Repository
- ๐ฆ X (Twitter)
- ๐ผ LinkedIn
- ๐บ YouTube
- ๐ธ Instagram
๐งช Usage
๐ง Initialization
from diffusers import DiffusionPipeline
import torch
model_name = "black-forest-labs/FLUX.1-dev"
# Load the pipeline
if torch.cuda.is_available():
torch_dtype = torch.bfloat16
device = "cuda"
else:
torch_dtype = torch.float32
device = "cpu"
pipe = DiffusionPipeline.from_pretrained(model_name, torch_dtype=torch_dtype)
pipe = pipe.to(device)๐ Load LoRA Weights
# Load LoRA weights
pipe.load_lora_weights('flux_anne_hathaway.safetensors', adapter_name="lora")๐จ Generate Image with lora trained on person
prompt = '''Portrait of ohwx woman, professional headshot, studio lighting, elegant pose, looking at camera, soft shadows, high quality, detailed facial features, cinematic lighting, 85mm lens, shallow depth of field'''
negative_prompt = "blurry, low quality, distorted, bad anatomy"
image = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
width=1024,
height=1024,
num_inference_steps=30,
guidance_scale=3.5,
generator=torch.Generator(device="cuda").manual_seed(346346)
)
# Display the image (in Jupyter or save to file)
image.show()
# or
image.save("output.png")๐ผ๏ธ Sample Output
๐๏ธ Using with ComfyUI
We provide a ready-to-use ComfyUI workflow that works with our trained LoRA models. Follow these steps to set up and use the workflow:
Setup Instructions
- Download the latest ComfyUI:
- Visit the ComfyUI GitHub repository
- Clone or download the latest version
- Install ComfyUI:
- Follow the installation instructions from the ComfyUI repository
- Make sure all dependencies are properly installed
- Download FLUX.1-dev model weights:
- Go to FLUX.1-dev model
- Download all the model files
- Place FLUX.1-dev weights in ComfyUI:
- Copy the downloaded FLUX.1-dev model files to the appropriate folders in
ComfyUI/models/ - Follow the folder structure as specified in the model repository
- Download our pre-trained LoRA weights:
- Visit flymy-ai/flux-anne-hathaway-lora
- Download the LoRA
.safetensorsfiles
- Place LoRA weights in ComfyUI:
- Copy the LoRA file
flymy-ai/flux-anne-hathaway-lora/pytorch_lora_weights.safetensorstoComfyUI/models/loras/
- Load the workflow:
- Open ComfyUI in your browser
- Load the workflow file
flux_anne_hathaway_lora_example.jsonlocated in this repository - The workflow is pre-configured to work with our LoRA models
Workflow Features
- โ Pre-configured for FLUX.1-dev + LoRA inference
- โ Optimized settings for best quality output
- โ Easy prompt and parameter adjustment
- โ Compatible with all our trained LoRA models
The ComfyUI workflow provides a user-friendly interface for generating images with our trained LoRA models without needing to write Python code.
๐ผ๏ธ Workflow Screenshot
๐จ Generation Examples
Below are examples of images generated with our Anne Hathaway LoRA model:
Casual Portrait Selfie
Prompt: "ohwx woman portrait selfie"
Artistic Double Exposure
Prompt: "ohwx woman perfectly symmetrical young female face close-up, presented with double exposure overlay blending nature textures like leaves and water"
Golden Hour Macro Portrait
Prompt: "ohwx woman Macro photography style close-up of female face with light makeup, focused on eyes and lips, illuminated by golden hour sunlight for warm tones"
Cozy Portrait with Panda
Prompt: "Close-up of ohwx woman in brown knitted turtleneck sweater. Sitting with big black and white panda, hugging it, looking at camera"
๐ Try it Online
Test this LoRA model directly in your browser:
๐ค Support
If you have questions or suggestions, join our community:
- ๐ FlyMy.AI
- ๐ Documentation
- ๐ป GitHub
- ๐ฌ Discord Community
- ๐ฆ Follow us on X
- ๐ผ Connect on LinkedIn
- ๐ง Support
โญ Don't forget to star the repository if you like it!
license: apache-2.0 ---
