--- language: - en tags: - stable-diffusion - text-to-image license: creativeml-openrail-m inference: false --- # Flex Waifu FlexWaifu is a fine-tuned model from Waifu Diffusion 1.3 for producing high resolution or different aspect ratio images. ## Model Description | Model Name | Recipe | | ---------------- | --------------------------------------------------------------------------------- | | FlexWaifu | WD1.3 + 2.0 * hires_test_a + smooth_test_a | | FlexWaifu v1.3.1 | FlexWaifu + 20.0 * IR_1girl1boy_1 + 16.0 * IR_1girl1boy_2 + 16.0 * IR_1girl1boy_3 | | FlexWaifuRainbow | FlexWaifu + FWRLoRA | ### FlexWaifu This model was created by merging two original LoRAs of [testLoRAs](https://huggingface.co/Ai-tensa/testLoRAs) into WD1.3. It is just a merged model. While this model is likely to produce good generation at medium resolution, consider using LoRAs of [testLoRAs](https://huggingface.co/Ai-tensa/testLoRAs) if it does not produce well. #### v1.3.1 The model is fine-tuned with self-generated images with a single word prompt "1girl" or "1boy" and generates well without much prompting. Twin LoRA has reduced the percentage of bad output without changing the style much. The images for the three Twin LoRAs were generated by FlexWaifu or a model merging Twin LoRA into it. 3-5k images are used per Twin LORA, no duplicates. The reward value of ImageReward was used to classify the images. ##### Twin LoRA When fine-tuning, we create two LoRAs, a good LoRA and a bad LoRA, and take the difference between them in order to suppress adverse effects and achieve the desired effect. **method** 1. Create a set of images with the same prompt. 2. Divide the image set into two equal parts, good and bad, according to certain evaluation criteria. 3. Create a LoRA for each data set. 4. Subtract the bad LoRA from the good LoRA. (Note: the dimension is twice the original LoRA) 5. Apply differential LoRA in any weight. ### Flex Waifu Rainbow This model is further fine-tuned from FlexWaifu with ~17k nijijourneyv5 tagged images of various authors published on the Internet. It is merged from six dim 8 LoRAs made in various settings, and FWRLoRA is the merged LoRA (dim 48). Most LoRAs were fine-tuned with Aspect Ratio Backetting with a maximum resolution of 1152x768 images, but some are up to 768x768 or 512x768. Image captions are made by BLIP and ~12k images also used WD1.4-tagger. ### Usage The format of the caption suggests that a short natural language sentence followed by a comma-separated tags is the most natural way to describe the prompt. Using more tags that are well-estimated by the tagger in the trained images may lead to more preferable generation. "tags.json" lists the tags estimated for over 200 of the 12k images. Tag semantics may be inappropriate for automatic tagging, so please emphasize appropriately. CLIP Skip 1 is recommended. ## License This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage. The CreativeML OpenRAIL License specifies: 1. You can't use the model to deliberately produce nor share illegal or harmful outputs or content 2. The authors claims no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in the license 3. You may re-distribute the weights and use the model commercially and/or as a service. If you do, please be aware you have to include the same use restrictions as the ones in the license and share a copy of the CreativeML OpenRAIL-M to all your users (please read the license entirely and carefully) [Please read the full license here](https://huggingface.co/spaces/CompVis/stable-diffusion-license) ## Acknowledgements These Models build on the two excellent works: SD1.4, developed by [CompVis Researchers](https://ommer-lab.com/), and WD1.3, developed by [Anthony Mercurio](https://github.com/harubaru), [Salt](https://github.com/sALTaccount/), and [Cafe](https://twitter.com/cafeai_labs). ## Examples **CLIP Skip 1 is recommended.** ### Flex Waifu v1.3.1 **Prompt 1** - with Negative Prompt ![](images/grid-0050-1443377636.png) - without Negative Prompt ![](images/grid-0051-3282638012.png) ``` solo, 1girl, white_background, full_body, twintails, braid, white_background, bangs, frills, closed_mouth, brown_hair, jewelry, blush, standing, dress, food, strawberry, (blueberry:1.1), (cake:1.1), sweets, brown_eyes, hair_ornament, skirt, bow Steps: 30, Sampler: UniPC, CFG scale: 7, Seed: 1443377636, Size: 768x768, Model hash: 7b8c719863, Model: FlexWaifu_FlexWaifu1.3.1, Denoising strength: 0.6, Version: v1.2.1, Hires upscale: 1.5, Hires steps: 18, Hires upscaler: Latent ``` **Prompt 2** - with Negative Prompt ![](images/grid-0086-4292874896.png) - without Negative Prompt ![](images/grid-0080-4292874896.png) ``` solo, 1girl, looking_at_viewer, long_hair, full_body, bangs, long_sleeves, closed_mouth, black_hair, jewelry, blush, standing, smile, earrings, outdoors, dress, flower, shirt, blue_eyes, hair_ornament, sky Negative prompt: 2girls, worst quality, low quality, lowres, blurry, bad anatomy, text, frame Steps: 18, Sampler: UniPC, CFG scale: 7, Seed: 4292874896, Size: 768x768, Model hash: 7b8c719863, Model: FlexWaifu_FlexWaifu1.3.1, Denoising strength: 0.6, Version: v1.2.1, Hires upscale: 1.5, Hires steps: 18, Hires upscaler: Latent ``` **Prompt 3** - with Negative Prompt ![](images/grid-0085-225005778.png) - without Negative Prompt ![](images/grid-0081-225005778.png) ``` solo, 1girl, full_body, white_background, indoors, from_side, short_hair, bangs, long_sleeves, closed_mouth, white_hair, jewelry, blush, standing, earrings dress, flower, shirt, blue_eyes, hair_ornament, skirt, bow Negative prompt: 2girls, worst quality, low quality, lowres, blurry, bad anatomy, text, frame Steps: 18, Sampler: UniPC, CFG scale: 7, Seed: 225005778, Size: 768x768, Model hash: 7b8c719863, Model: FlexWaifu_FlexWaifu1.3.1, Denoising strength: 0.6, Version: v1.2.1, Hires upscale: 1.5, Hires steps: 18, Hires upscaler: Latent ``` **Prompt 4** - with Negative Prompt ![](images/grid-0087-3916047400.png) - without Negative Prompt ![](images/grid-0088-3916047400.png) ``` a woman holding jar is standing near kitchen, 1girl, solo, long_hair, breasts, looking_at_viewer, blush, smile, bangs, black_hair, hair_ornament, dress, holding, bare_shoulders, closed_mouth, standing, collarbone, ponytail, braid, sidelocks, day, indoors, hair_over_shoulder, white_dress, window, shelf, sunlight, cup, bottle, holding_cup, mug, plant, potted_plant Negative prompt: 2girls, worst quality, low quality, lowres, blurry, bad anatomy, text, frame Steps: 18, Sampler: UniPC, CFG scale: 7, Seed: 3916047400, Size: 768x768, Model hash: 7b8c719863, Model: FlexWaifu_FlexWaifu1.3.1, Denoising strength: 0.6, Version: v1.2.1, Hires upscale: 1.5, Hires steps: 18, Hires upscaler: Latent ``` ### Flex Waifu Rainbow **Prompt 1** ![](images/01013-3282638012.png) ![](images/grid-0170.png) ``` solo, 1girl, white_background, full_body, twintails, braid, white_background, bangs, frills, closed_mouth, brown_hair, jewelry, blush, standing, dress, food, strawberry, (blueberry:1.1), (cake:1.1), sweets, brown_eyes, hair_ornament, skirt, bow Negative prompt: 2girls, worst quality, low quality, lowres, blurry, bad anatomy, text, frame Steps: 30, Sampler: UniPC, CFG scale: 7, Seed: 3282638012, Size: 768x768, Model hash: 3f709dac23, Model: models_FlexWaifu_FlexWaifuRainbow, Denoising strength: 0.6, Hires upscale: 1.5, Hires steps: 18, Hires upscaler: Latent ``` **Prompt 2** ![](images/grid-0174.png) ``` solo, 1girl, looking_at_viewer, long_hair, full_body, bangs, long_sleeves, closed_mouth, black_hair, jewelry, blush, standing, smile, earrings, outdoors, dress, flower, shirt, blue_eyes, hair_ornament, sky Negative prompt: 2girls, worst quality, low quality, lowres, blurry, bad anatomy, text, frame Steps: 30, Sampler: UniPC, CFG scale: 7, Seed: 4292874896, Size: 768x768, Model hash: 3f709dac23, Model: models_FlexWaifu_FlexWaifuRainbow, Denoising strength: 0.6, Hires upscale: 1.5, Hires steps: 18, Hires upscaler: Latent ``` **Prompt 3** ![](images/grid-0176.png) ``` solo, 1girl, full_body, white_background, indoors, from_side, short_hair, bangs, long_sleeves, closed_mouth, white_hair, jewelry, blush, standing, earrings dress, flower, shirt, blue_eyes, hair_ornament, skirt, bow Negative prompt: 2girls, worst quality, low quality, lowres, blurry, bad anatomy, text, frame Steps: 30, Sampler: UniPC, CFG scale: 7, Seed: 225005778, Size: 768x768, Model hash: 3f709dac23, Model: models_FlexWaifu_FlexWaifuRainbow, Denoising strength: 0.6, Hires upscale: 1.5, Hires steps: 18, Hires upscaler: Latent ``` **Prompt 4** - CLIP Skip 1 (recommended) ![](images/grid-0182.png) ``` a woman holding jar is standing near kitchen, 1girl, solo, long_hair, breasts, looking_at_viewer, blush, smile, bangs, black_hair, hair_ornament, dress, holding, bare_shoulders, closed_mouth, standing, collarbone, ponytail, braid, sidelocks, day, indoors, hair_over_shoulder, white_dress, window, shelf, sunlight, cup, bottle, holding_cup, mug, plant, potted_plant Negative prompt: 2girls, worst quality, low quality, lowres, blurry, bad anatomy, text, frame Steps: 30, Sampler: DPM++ 2M, CFG scale: 7, Seed: 3916047400, Size: 768x768, Model hash: 3f709dac23, Model: models_FlexWaifu_FlexWaifuRainbow, Denoising strength: 0.6, Hires upscale: 1.5, Hires steps: 18, Hires upscaler: Latent ``` - CLIP SKip 2 ![](images/grid-0183.png) ``` a woman holding jar is standing near kitchen, 1girl, solo, long_hair, breasts, looking_at_viewer, blush, smile, bangs, black_hair, hair_ornament, dress, holding, bare_shoulders, closed_mouth, standing, collarbone, ponytail, braid, sidelocks, day, indoors, hair_over_shoulder, white_dress, window, shelf, sunlight, cup, bottle, holding_cup, mug, plant, potted_plant Negative prompt: 2girls, worst quality, low quality, lowres, blurry, bad anatomy, text, frame Steps: 30, Sampler: DPM++ 2M, CFG scale: 7, Seed: 3156421384, Size: 768x768, Model hash: 3f709dac23, Model: models_FlexWaifu_FlexWaifuRainbow, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires steps: 18, Hires upscaler: Latent ```