Warlord-K commited on
Commit
3ab0e03
1 Parent(s): 3fb3f4c

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +113 -0
README.md ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - text-to-image
5
+ - ultra-realistic
6
+ - text-to-image
7
+ - stable-diffusion
8
+ - mixture-of-experts
9
+ - segmoe
10
+ pinned: true
11
+ library_name: diffusers
12
+ ---
13
+
14
+ # SegMoE-SD-4x2-v0: Segmind Mixture of Diffusion Experts
15
+
16
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62f8ca074588fe31f4361dae/TJTQyN9tav94fVcvpZGq8.png)
17
+
18
+ SegMoE-SD-4x2-v0 is an untrained Segmind Mixture of Diffusion Experts Model generated using [segmoe](https://github.com/segmind/segmoe) from 4 Expert SD1.5 models. SegMoE is a powerful framework for dynamically combining Stable Diffusion Models into a Mixture of Experts within minutes without training. The framework allows for creation of larger models on the fly which offer larger knowledge, better adherence and better image quality.
19
+
20
+ ## Usage
21
+
22
+ This model can be used via the [segmoe](https://github.com/segmind/segmoe) library.
23
+
24
+ Make sure to install segmoe by running
25
+
26
+ ```bash
27
+ pip install segmoe
28
+ ```
29
+
30
+ ```python
31
+ from segmoe import SegMoEPipeline
32
+
33
+ pipeline = SegMoEPipeline("segmind/SegMoE-SD-4x2-v0", device = "cuda")
34
+
35
+ prompt = "cosmic canvas, orange city background, painting of a chubby cat"
36
+ negative_prompt = "nsfw, bad quality, worse quality"
37
+ img = pipeline(
38
+ prompt=prompt,
39
+ negative_prompt=negative_prompt,
40
+ height=1024,
41
+ width=1024,
42
+ num_inference_steps=25,
43
+ guidance_scale=7.5,
44
+ ).images[0]
45
+ img.save("image.png")
46
+ ```
47
+
48
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62f8ca074588fe31f4361dae/z6T2lYPlbXifoh_D5EkLZ.png)
49
+
50
+ ### Config
51
+ Config Used to create this Model is:
52
+
53
+ ```yaml
54
+ base_model: SG161222/Realistic_Vision_V6.0_B1_noVAE
55
+ num_experts: 4
56
+ moe_layers: all
57
+ num_experts_per_tok: 2
58
+ experts:
59
+ - source_model: SG161222/Realistic_Vision_V6.0_B1_noVAE
60
+ positive_prompt: "cinematic, portrait, photograph, instagram, fashion, movie, macro shot, 8K, RAW, hyperrealistic, ultra realistic,"
61
+ negative_prompt: " (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime), text, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck"
62
+ - source_model: dreamlike-art/dreamlike-anime-1.0
63
+ positive_prompt: "photo anime, masterpiece, high quality, absurdres, 1girl, 1boy, waifu, chibi"
64
+ negative_prompt: "simple background, duplicate, retro style, low quality, lowest quality, 1980s, 1990s, 2000s, 2005 2006 2007 2008 2009 2010 2011 2012 2013, bad anatomy, bad proportions, extra digits, lowres, username, artist name, error, duplicate, watermark, signature, text, extra digit, fewer digits, worst quality, jpeg artifacts, blurry"
65
+ - source_model: Lykon/dreamshaper-8
66
+ positive_prompt: "bokeh, intricate, elegant, sharp focus, soft lighting, vibrant colors, dreamlike, fantasy, artstation, concept art"
67
+ negative_prompt: "low quality, lowres, jpeg artifacts, signature, bad anatomy, extra legs, extra arms, extra fingers, poorly drawn hands, poorly drawn feet, disfigured, out of frame, tiling, bad art, deformed, mutated, blurry, fuzzy, misshaped, mutant, gross, disgusting, ugly, watermark, watermarks"
68
+ - source_model: dreamlike-art/dreamlike-diffusion-1.0
69
+ positive_prompt: "dreamlikeart, a grungy woman with rainbow hair, travelling between dimensions, dynamic pose, happy, soft eyes and narrow chin, extreme bokeh, dainty figure, long hair straight down, torn kawaii shirt and baggy jeans, In style of by Jordan Grimmer and greg rutkowski, crisp lines and color, complex background, particles, lines, wind, concept art, sharp focus, vivid colors"
70
+ negative_prompt: "nude, naked, low quality, lowres, jpeg artifacts, signature, bad anatomy, extra legs, extra arms, extra fingers, poorly drawn hands, poorly drawn feet, disfigured, out of frame"
71
+ ```
72
+
73
+ ### Other Variants
74
+
75
+ We release 3 merges on Hugging Face,
76
+
77
+ - [SegMoE 4x2](https://huggingface.co/segmind/SegMoE-SD-4x2-v0) has four Stable Diffusion XL expert models.
78
+ - [SegMoE 2x1](https://huggingface.co/segmind/SegMoE-2x1-v0) has two Stable Diffusion XL expert models.
79
+
80
+ ### Model Description
81
+
82
+ - **Developed by:** [Segmind](https://www.segmind.com/)
83
+ - **Developers:** [Yatharth Gupta](https://huggingface.co/Warlord-K) and [Vishnu Jaddipal](https://huggingface.co/Icar).
84
+ - **Model type:** Diffusion-based text-to-image generative mixture of experts model
85
+ - **License:** Apache 2.0
86
+
87
+ ### Out-of-Scope Use
88
+
89
+ The SegMoE-SD-4x2-v0 Model is not suitable for creating factual or accurate representations of people, events, or real-world information. It is not intended for tasks requiring high precision and accuracy.
90
+
91
+ ## Advantages
92
+ + Benefits from The Knowledge of Several Finetuned Experts
93
+ + Training Free
94
+ + Better Adaptability to Data
95
+ + Model Can be upgraded by using a better finetuned model as one of the experts.
96
+
97
+ ## Limitations
98
+ + Though the Model improves upon the fidelity of images as well as adherence, it does not be drastically better than any one expert without training and relies on the knowledge of the experts.
99
+ + This is not yet optimized for speed.
100
+ + The framework is not yet optimized for memory usage.
101
+
102
+ ## Citation
103
+
104
+ ```bibtex
105
+ @misc{segmoe,
106
+ author = {Yatharth Gupta, Vishnu V Jaddipal, Harish Prabhala},
107
+ title = {SegMoE},
108
+ year = {2024},
109
+ publisher = {HuggingFace},
110
+ journal = {HuggingFace Models},
111
+ howpublished = {\url{https://huggingface.co/segmind/SegMoE-SD-4x2-v0}}
112
+ }
113
+ ```