CivArchive
    SapianF - Nude Men & Women for Flux (Now De-Distilled!) - v2.0-FP8
    NSFW
    Preview undefined
    Preview undefined
    Preview undefined
    Preview undefined

    The First Flux Model Allowing Nude Men & Women to Co-Exist!

    Trained Locally on a 3090 using the SD3 Branch of Kohya's SD3-Scripts!

    Whilst definitely still a proof of concept compared to something like Pony, it (often) does what it was designed to do quite well!


    V2.5 Update

    This version is a merge of training runs done on Flux De-Distill and Flux Dev2Pro, both of which seek to remove distillation from Flux Dev. Models were merged w/ a ratio of 0.7:0.3 Dev2Pro:De-Distill. The dataset has been unaltered from version 2, hence why it's v2.5 as opposed to v3.

    The result is FAR greater image quality and generally better prompt adherence at the cost of increased generation times. Example images were generated using a modified version of the DynamicThresholdingFull Node to allow more precise Threshold Percentile values. This can be done by adding an extra 0 to step on line 11 of dynthres_comfyui.py.

    Initial Q8 GGUF release has near indistinguishable quality from FP16 and should run on most hardware. Requires the ComfyUI GGUF custom node. The FP16 version will be uploaded towards the end of the week; FP8 version may or may not be uploaded depending on demand.

    Notes:

    • Whilst the model can somewhat work with the default Flux guidance of 3.5 and a CFG of 1, it is highly advised to remove the Flux Guidance node entirely and set CFG to something above 1

    • Takes anywhere from 2-3 times as long to generate an image compared to previous versions, but the drastic increase in quality makes this worth it IMO

    • It is recommended to use a step count between 40 and 60

    • Due to using the same dataset as v2 it still does have some issues carried over:

      • Female genitalia seems undertrained

      • No NSFW poses

      • Pubic and body hair seems prevalent even if you specify to avoid including it

      • Still has trouble distinguishing between circumcised and uncircumcised

      • Erect/Flaccid is sometimes not interpreted properly with more complex prompts or when generating an image with multiple male characters. It is my hope these issues will be remedied with version 3


    V2 Update

    Introducing Better Prompt Adherence and Anatomy!

    This version was trained on the original SapianF model with an expanded dataset (3x as large) with more aggressive masking and prompting, along with a lower learning rate (22e-6 vs 25e-6). The result is a greater understanding of concepts like erect vs flaccid, dense pubes vs shaved pubes, and an overall improvement to genital anatomy, especially when it comes to male characters!

    The dataset for males now contains 175 images, and the female dataset now consists of 75 images, both with a larger variety of poses, angles, and concepts.

    Images were masked more aggressively with lower non-masked values, forcing the model to focus on the genitalia specifically, with captioning for these new images is far more focused on the subject.

    Learning rate was also decreased to allow the model to be trained for a longer period of time to allow it to better learn the concepts described.

    Model was trained for 6 epochs, with epoch 4 producing the most consistent results. The blocks of this model were merged with the original model by hand with the goal of keeping elements consisted whilst transferring over the concepts which were trained.

    Notes:

    • Whilst a big improvement overall, it's still not perfect. Depending on the prompt and seed elements can still produce suboptimal results, though this is much more rare

      • It is likely that the only way to fully fix this issue is with even lower learning rates, longer training times, a further expanded dataset, and a higher batch size during training, most of which aren't really going to be possible on my hardware for the time

    • It is recommended to run the model with the improved CLIP-L model and LongCLIP model released by zer0int1 a couple days ago. The ComfyUI node for LongCLIP can be found here


    About

    There are plenty of Flux checkpoints out there now that allow for both nude men and women to be generated, with one caveat...

    These models are trained only on members of a single sex, meaning that if it's trained on nude men, any attempt to generate nude women will result in male genitalia being added unprompted. Similarly, attempting to generate nude men on model's trained on nude women will result in female genitalia being added to nude men unprompted.

    So I set out with what I thought would be a simple task: train either a LoRA or Checkpoint to generate both nude men and nude women.

    LoRA training was quickly ruled out due to consistently suboptimal outputs, but after much testing full checkpoint training has clearly yielded better results!

    Training/Dataset

    The dataset consisted of 45 images of nude men, 30 images of nude women, 15 images of nude men and women together in an image (tasteful), and 50 regularization images generated with my regularization workflow. Images were primarily front and side facing, and consisted mostly of standing and sitting poses from a variety of angles. Dataset was resized to 1024, 768 and 512 for multi-resolution training. Masked training was completed by manually drawing a white mask over the genital areas, and setting the rest of the masked area to 30%.

    Of the non-regularization images, 60% were captioned using Joy Caption with modifications as needed, and 40% were manually captioned using natural language descriptions by hand.

    In my testing female anatomy seems to train substantially faster than male anatomy, so image repeats for the men & women and men datasets were double that of the women and regularization images.

    Learning rate was 25e-6, and was run for approximately 7,500 steps. Took 10 hours to train on my 3090! Training was completed on both the regular Dev model, along with a Dev model that had a female-focused NSFW LoRA applied prior to training. Both models were merged together in ComfyUI afterwards.

    Considerations

    • As said earlier, this is still a proof of concept. NSFW is very difficult to train with Flux, and the limited dataset I have can often require some seed searching

    • The model as of now has only a rudimentary understanding of sub-concepts like pubic hair, erect/flaccid, and circumcised/uncircumcised, and thus results are often of questionable quality. You can often still force the model to work with these sub-concepts by playing with guidance settings and searching through different seeds, but more focused training will likely be required

    • If you are only looking to generate images of a particular sex, models trained on that specific sex will usually produce better quality images

    Description

    Version 2 is Here!

    Introducing Better Prompt Adherence and Anatomy!

    This version was trained on the original SapianF model with an expanded dataset (3x as large) with more aggressive masking and prompting, along with a lower learning rate (22e-6 vs 25e-6). The result is a greater understanding of concepts like erect vs flaccid, dense pubes vs shaveed pubes, and an overall improvement to genital anatomy, especially when it comes to male characters!

    More details can be found in the main description.

    FAQ

    Comments (22)

    CrownVic07Sep 5, 2024· 5 reactions
    CivitAI

    Dude, this model is awesome. Probably the best NSFW Flux finetune I've seen due to its versatility. But is there any way you could improve the nipples. I'm not asking for perfection. Clearly, this model's strengths are meant to lie elsewhere. But I'm not even getting believable nips most of the time.

    Anyway, keep it up man. That is my only complaint/request on an otherwise stellar model.

    TheGreatOne321
    Author
    Sep 5, 2024

    I haven't noticed any issues with character nipples in any of the images I've generated with the model. How are you prompting it, and are you using any LoRAs alongside it?

    CrownVic07Sep 5, 2024

    @TheGreatOne321 No loras. My test prompt is something like "a nude woman with long blonde hair sitting on a couch in a living room. she is smiling." And for the CLIPI something short like "woman, nude, living room" The nipples aren't terrible, per se. But you can usually tell they're being influenced by Flux's original censorship. They often come out as indiscernible pink splotches or worse. Rarely do you get nipples with distinct areolas.

    TheGreatOne321
    Author
    Sep 5, 2024· 1 reaction

    @CrownVic07 I haven't tested this latest model with separate prompts for T5 and CLIP L, but I do recall getting worse results when I initially tried to on other models. See if you get the same issue when using a single prompt across both.

    CrownVic07Sep 5, 2024· 1 reaction

    @TheGreatOne321 I tried using one prompt for T5 and Clip L and there was no appreciable difference. It could also be a quirk of how I'm using the model. I like to upscale by 50%. I start with a resolution like 832x1216 and then I upscale to 1248x1824. For a full body shot at 832x1216, pink splotches for the nips is actually be pretty accurate at that resolution. But nipples don't seem to improve with upscaling while the rest of the body (genitals included) does improve which kind of throws the image off for me. It's just a small thing. And half the time you do get realistic and detailed nipples so idk...

    Did you say you trained this finetune on a 3090? 24gb of vram? I've got a 4090 and am looking to get into LoRA training soon. Hopefully within the next couple weeks. Do you have any tips for a beginner? It sounds like the Kohya trainer is the way to go right now.

    TheGreatOne321
    Author
    Sep 5, 2024· 1 reaction

    @CrownVic07 Haven't really attempted upscaling with Flux so that could be the cause, though if the genitals are still turning out fine that's a bit odd. I should also specify that the model isn't explicitly trained on "nipples" in terms of prompting or masking; more so just seems to have picked that up on it's own from the data. I'll also clarify that all of my testing has been done on the FP16 T5 and model weights, so I can't really comment on the difference in quality from the FP8 model; I just uploaded the FP16 model today if you wanted to test to see if it improved things.

    Most of the tips are provided in the description, but to summarize:

    * Large variety in dataset and captioning style = good

    * Caption the dataset in natural language much like how you'd prompt a similar image

    * Use regularization images, should make up 1/5th to half the dataset (have a workflow and further instructions for this on my profile)

    * Lower learning rates produce better results at the expense of longer training times, but are definitely worth the trade-off

    * Masked training usually helps train the model quicker, and usually prevents overwriting the original model weights/overfitting

    * Higher batch sizes during training seem to yield better results, though your ability to increase this is severely limited with 24GB of VRAM. Might be worth increasing block swaps despite the massive increase in training time this can lead to

    hadengSep 5, 2024· 2 reactions
    CivitAI

    does it work with the character Loras? Most of the nudity loras affect the face too.

    TheGreatOne321
    Author
    Sep 5, 2024· 2 reactions

    The way LoRAs affect the model are unpredictable currently. Style LoRAs seem to work fairly consistently, but other types of LoRAs are spotty at best.

    I'm not sure if this is just a quirk with current training practices, or if it's similar to how Pony wouldn't work great with base XL LoRAs, but the same issue seems to happen with a LoRA extract from the finetune. I mentioned the issue on Kohya's GitHub but haven't received a response

    TipsyAI91Sep 6, 2024

    @TheGreatOne321 Do you have a link to that post so I can follow it?

    JanetSep 5, 2024· 1 reaction
    CivitAI

    Loving the pube diversity. Would love to see all kinds of pube variations, lol, waxed, shaved, and huge bush,

    WhatTheGuySep 5, 2024· 1 reaction
    CivitAI

    v2 is a nice upgrade =D

    ishadowxxSep 5, 2024· 5 reactions
    CivitAI

    Please make an NF4 6Step version of this like https://civitai.com/models/646328 for us 8GB peasants. 🙏

    TheGreatOne321
    Author
    Sep 9, 2024· 1 reaction

    Currently getting the NF4 version done up but not entirely sure how to make a 6 step version. If you have links to any guides or documentation for that let me know.

    ishadowxxSep 10, 2024

    @TheGreatOne321 It is a merge with the Hyper-SD lora from ByteDance, AFAIK. https://huggingface.co/ByteDance/Hyper-SD/tree/main

    quintessentialfo4180Sep 13, 2024· 1 reaction

    @TheGreatOne321 I can confirm that applying the Hyper-SD lora at 0.13 strength allows this model to generate at 6 steps, as long as you use hires fix (with sharpening, preferably). A merge should work.

    JanetSep 9, 2024· 3 reactions
    CivitAI

    I cannot get this working, maybe someone could share a workflow wit h the correct unet loader?

    TheGreatOne321
    Author
    Sep 9, 2024

    Workflows are attached to the example images. That being said, the loader you should use is called "UNet Loader", and the model should be located in the "models\unet" folder

    JanetSep 11, 2024

    @TheGreatOne321 I should use a FP8 clip with this? I tried the workflow and it disconnected my GPU (I've got an annoying eGPU)

    TheGreatOne321
    Author
    Sep 11, 2024

    @Janet you can use either the FP16 or FP8 T5 models with both the FP8 and FP16 Sapian F models

    JanetSep 13, 2024

    @TheGreatOne321 so my errors aren't due to a mismatch, because any combo will work...

    supertypSep 29, 2024

    @TheGreatOne321 When I use fp16 with the fp8 model, I get a "MEMORY_MANAGEMENT" bluescreen.

    TheGreatOne321
    Author
    Sep 29, 2024

    @supertyp I can't replicate this error so it's likely either an issue with a driver or the version of ComfyUI that you're using, but I'm not an expert on blue screens and don't have enough information to say that for certain

    Checkpoint
    Flux.1 D

    Details

    Downloads
    3,065
    Platform
    CivitAI
    Platform Status
    Available
    Created
    9/4/2024
    Updated
    5/13/2026
    Deleted
    -

    Files

    sapianfNudeMenWomenForFlux_v20FP8.safetensors