Readme
HAFFF: Hands and Faces Fix with Flux
HAFFF (Hands and Faces Fix with Flux) is a powerful image inpainting model designed to automatically detect and correct common malformations in hands and faces within high-resolution images. Leveraging the advanced capabilities of the FLUX.1-dev inpainting pipeline and the state-of-the-art Adetailer YOLOv9c models, hafff ensures your images look flawless with minimal effort.
Example of hands and faces fixed using hafff
Features
High-Resolution Inpainting: Utilizes FLUX.1-dev to handle high-resolution images, ensuring detailed and accurate fixes without compromising image quality. Automatic Malformation Fixes: Specializes in detecting and correcting common issues in hands and faces, two of the most intricate and sensitive areas in images. Enhanced Adetailer Models: Employs the latest Adetailer YOLOv9c models for precise detection of hands and faces, enabling targeted and effective inpainting. Seamless Integration: Easily accessible via Replicate’s simplified API and user-friendly web interface, requiring no deep technical knowledge. Efficient Workflow: Runs two sequential inpainting passes—first for hands, then for faces—to ensure comprehensive image enhancement while optimizing memory usage. How It Works Upload Your Image: Provide an image containing hands and/or faces that need correction. Automatic Detection: hafff uses the Adetailer YOLOv9c models to accurately detect hands and faces within the image. Targeted Inpainting: The FLUX.1-dev pipeline inpaints the detected regions, fixing malformations and enhancing the overall appearance. Receive Enhanced Image: Download the refined image with seamlessly corrected hands and faces, maintaining the original resolution and quality.
Usage
Via API
Integrate hafff into your applications effortlessly using Replicate’s straightforward API. Whether you’re enhancing user-uploaded photos or automating image correction in your workflows, hafff is designed to fit seamlessly.
Example Request:
import replicate
model = replicate.models.get("goddest/hafff")
output = model.predict(
image="https://your-image-link.com/input-image.jpg",
prompt="Enhance the hands and face to appear natural and well-formed."
)
print(output)
# Output: "https://your-image-link.com/out_fixed_hands_faces.png"
Via Web Interface
No coding required! Use Replicate’s intuitive web interface to upload your image, input a descriptive prompt, and receive your enhanced image in just a few clicks.
Visit the hafff Model Page on Replicate. Upload Your Image: Click to upload or drag-and-drop your image file. Enter a Prompt: Provide a brief description to guide the inpainting process (e.g., “Fix the hands and make the face look natural”). Run the Model: Click the “Predict” button and wait for your image to be processed. Download the Result: Once processing is complete, download your enhanced image.
Parameters
- Image: The input image you want to enhance, containing hands and/or faces.
- Prompt: A descriptive text guiding the inpainting process (e.g., “Smooth out the hands and brighten the face for a natural look”).
- Detection Confidence Threshold: Adjust the sensitivity of hand and face detection (default: 0.25).
- Guidance Scale: Controls how closely the inpainting adheres to the prompt (default: 7.0).
- Number of Inference Steps: Determines the quality and detail of the inpainting (default: 30).
- Strength: Balances the degree of alteration in the masked regions (default: 0.85).
- Seed: Optional random seed for reproducibility.
Example Use Cases
- Photography: Enhance portraits by correcting hand placements and facial features.
- E-commerce: Improve product images by fixing hand interactions with products and ensuring clear, appealing facial displays.
- Social Media: Quickly refine images before sharing to present the best version of your photos.
- Content Creation: Automate image corrections in bulk for blogs, websites, and other digital content platforms.
Why Choose hafff?
- Precision and Quality: Combines top-tier models to deliver accurate and high-quality inpainting results.
- Ease of Use: Accessible to both technical and non-technical users through Replicate’s versatile interface options.
- Efficiency: Optimized to manage memory effectively, ensuring smooth performance even on high-resolution images.
- Reliability: Built on robust models and infrastructure, providing consistent and dependable results every time.
License
Personal, scientific and commercial uses are allowed. Apache 2.0 license.
Made with ❤️ using Replicate, FLUX.1-dev, and Adetailer models.