KKNTR commited on
Commit
e31a8af
·
verified ·
1 Parent(s): e0795ce

Upload 4 files

Browse files
Files changed (4) hide show
  1. README.md +5 -5
  2. app.py +362 -0
  3. gitattributes +35 -0
  4. requirements.txt +8 -0
README.md CHANGED
@@ -1,10 +1,10 @@
1
  ---
2
- title: PUMP
3
- emoji: 🔥
4
- colorFrom: blue
5
- colorTo: gray
6
  sdk: gradio
7
- sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
10
  ---
 
1
  ---
2
+ title: crash
3
+ emoji: 📈
4
+ colorFrom: gray
5
+ colorTo: yellow
6
  sdk: gradio
7
+ sdk_version: 5.49.0
8
  app_file: app.py
9
  pinned: false
10
  ---
app.py ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import spaces
2
+ import torch
3
+ from diffusers import StableDiffusionXLPipeline
4
+ import gradio as gr
5
+ import random
6
+ import re
7
+
8
+
9
+ model_id = "kkntr/sdxl-kkntr"
10
+
11
+ pipe = StableDiffusionXLPipeline.from_pretrained(
12
+ model_id,
13
+ torch_dtype=torch.float16,
14
+ use_safetensors=True
15
+ ).to("cuda")
16
+
17
+ # --- Rekisteröidään pysyvät LoRAt ADAPTEREINA (ei painoja vielä) ---
18
+ PERSISTENT_LORAS = {
19
+
20
+ "foreskin": ("kkntr/lora17", 0.3),
21
+ "bakemonoy": ("kkntr/lora25", 0.2),
22
+ "chunie": ("kkntr/lora23", 0.2),
23
+ "meesh": ("kkntr/lora19", 0.5),
24
+ "real": ("kkntr/lora31", 0.5),
25
+ "kyo": ("kkntr/kyo", 1.0),
26
+
27
+ }
28
+ for name, (repo, _) in PERSISTENT_LORAS.items():
29
+ pipe.load_lora_weights(repo, adapter_name=name)
30
+
31
+ # --- Rekisteröidään tyyli-LoRAt ADAPTEREINA (ei painoja vielä) ---
32
+ STYLE_LORAS = {
33
+ "None": (None, 0.0, "", None),
34
+ "Foreskin play": ("kkntr/lora5", 1.0, "foreskin insertion", "style_fp"),
35
+ "Cum through clothing": ("kkntr/lora6", 1.0, "cum in clothing", "style_cc"),
36
+ "Penis through leghole": ("kkntr/lora7", 1.0, "penis through leghole, loose shorts, poking out", "style_ptl"),
37
+ "Frottage": ("kkntr/lora8", 1.0, "byfrottage, frottage", "style_fr"),
38
+ "Penis towards viewer": ("kkntr/lora9", 1.0, "penis_towards_viewer", "style_ptv"),
39
+ "Foreskin play closeup": ("kkntr/lora11", 0.6, "ZonkFS, tongue in foreskin, close-up, furry, anthro, faceless male, penis, foreskin, fellatio, oral, foreskin play, side view, steam", "style_fscl"),
40
+ }
41
+ for key, spec in STYLE_LORAS.items():
42
+ repo = spec[0]
43
+ adapter_name = spec[3]
44
+ if repo and adapter_name:
45
+ pipe.load_lora_weights(repo, adapter_name=adapter_name)
46
+
47
+ # Scratchpad vaihtoehdot
48
+ scratchpad = {
49
+ "animal": [
50
+ "kangaroo", "kangaroo", "otter", "otter", "shark", "shark", "shark", "dolphin", "dolphin", "avian", "tiger", "lion", "wolf", "fox", "polar bear", "polar bear", "deer", "deer", "reindeer", "reindeer", "hyena", "bull", "bull",
51
+ "rabbit", "panther", "moose", "cheetah", "badger", "striped hyena", "rat", "leopard", "thylacine", "bighorn sheep",
52
+ "zebra", "horse", "horse", "donkey", "donkey", "unicorn", "white unicorn", "alligator", "western dragon", "lizard", "crocodile", "theropod",
53
+ "kangaroo", "otter", "tiger", "lion", "wolf", "fox", "polar bear", "deer", "reindeer", "hyena", "bull",
54
+ "rabbit", "panther", "moose", "cheetah", "badger", "striped hyena", "rat", "leopard", "thylacine", "bighorn sheep",
55
+ "zebra", "horse", "donkey", "unicorn", "white unicorn", "alligator", "western dragon", "lizard", "crocodile", "theropod",
56
+ "kangaroo", "otter", "tiger", "lion", "wolf", "fox", "polar bear", "deer", "reindeer", "hyena", "bull",
57
+ "rabbit", "panther", "moose", "cheetah", "badger", "striped hyena", "rat", "leopard", "thylacine", "bighorn sheep",
58
+ "zebra", "horse", "donkey", "unicorn", "white unicorn", "alligator", "western dragon", "lizard", "crocodile", "theropod",
59
+ "black russian terrier", "pit bull", "schnauzer", "dobermann", "mastiff", "molosser", "pinscher", "rottweiler", "tamaskan dog",
60
+ "wolfdog", "alaskan husky", "alaskan malamute", "canadian eskimo dog", "german shepherd", "labrador husky", "siberian husky",
61
+ "labrador", "golden retriever", "dalmatian", "border collie", "collie", "herding dog", "pastoral dog", "sheepdog",
62
+ "carolina dog", "rhodesian ridgeback", "nordic sled dog", "spitz", "husky", "akita", "mountain dog", "primitive dog",
63
+ "siberian retriever", "hunting dog", "australian cattle dog", "crash bandicoot", "montgomery gator, fnaf", "bear",
64
+ "parrot", "bison", "buffalo", "cattle", "muskox", "yak", "alpaca", "goat", "sheep", "deer", "elk", "moose", "reindeer", "white-tailed deer",
65
+ "raccoon", "skunk", "whale", "tasmanian devil", "badger", "ermine", "ferret", "marten", "mink", "otter", "weasel", "wolverine", "squirrel",
66
+ "white rabbit", "pegasus", "goat", "mouse", "cattle", "coyote", "owl", "charizard", "bandicoot", "giant panda", "panda", "ocelot", "panther",
67
+ "cheetah", "cougar", "puma", "pony", "camel", "llama", "penguin", "duck", "duck", "duck",
68
+ ],
69
+
70
+ "pose": [
71
+ "flexing", "double biceps pose", "side chest pose", "front lat spread pose", "back double biceps pose", "side biceps pose",
72
+ "adonis pose", "arms akimbo", "crossed arms", "hands on hips", "hands behind head", "one hand behind head", "torso twist", "power stance",
73
+ "v-shape", "clenched fists", "palm open", "fist pump", "victory pose", "comic shrug", "superhero pose", "front double biceps pose",
74
+ "front lat spread pose", "side chest pose", "side triceps pose", "rear double biceps pose", "rear lat spread pose",
75
+ "most muscular pose", "abdominal and thigh pose", "hands-on hips pose",
76
+ ],
77
+
78
+ "swimwear": [
79
+ "swimming trunks", "swim shorts", "swim briefs", "speedo", "boxer swim shorts", "bermuda swim shorts", "swimming thong",
80
+ "swim g-string", "board shorts", "jammers", "tight swim shorts", "loose swim shorts", "short swim trunks",
81
+ ],
82
+
83
+ "headwear": [
84
+ "baseball cap", "backwards headwear", "backwards baseball cap", "snapback cap", "backwards snapback cap", "trucker hat", "backwards trucker hat",
85
+ "fitted cap", "beanie hat", "headband",
86
+ "bandana",
87
+ ],
88
+
89
+ "setting:private": [
90
+ "bedroom", "bathroom", "shower", "bathtub"
91
+ "locker room", "changing room", "dressing room",
92
+ "communal shower", "forest", "tent", "poolside",
93
+ "sauna", "hot tub", "jacuzzi",
94
+ "gym locker room", "living room", "beach",
95
+ ],
96
+
97
+ "setting:semi": [
98
+ "bedroom", "living room", "locker room", "beach", "tent", "beach", "gym", "fitness center", "weight room", "boxing gym", "martial arts dojo",
99
+ "yoga studio", "crossfit box", "track and field stadium", "football field", "soccer pitch", "basketball court", "tennis court", "volleyball court",
100
+ "basketball gym", "rugby field", "baseball field", "athletics track", "sports hall", "indoor sports arena", "climbing gym", "rowing machine area",
101
+ "boxing ring", "wrestling mat", "exercise studio", "outdoor running track", "forest jogging trail", "park running path", "mountain trail",
102
+ "soccer training field", "football practice field", "open field for sports", "stadium track", "indoor training facility", "cross-country track",
103
+ "school sports field", "college sports field", "stadium gym", "athletic training ground", "exercise park", "outdoor gym area", "hiking trail with training stations",
104
+ ],
105
+
106
+ "setting:public": [
107
+ "living room", "classroom", "bar", "street", "cafe", "restaurant", "mall", "supermarket", "bus stop", "train station",
108
+ "subway station", "office", "library", "parking lot", "cinema", "arcade", "amusement park", "gas station", "bookstore", "hardware store",
109
+ "coffee shop", "fast food restaurant", "pharmacy", "hotel lobby", "airport terminal", "shopping center", "convenience store", "train platform",
110
+ "bus station", "school hallway", "university campus", "city square", "playground", "arcade room", "movie theater lobby", "food court", "bakery",
111
+ "deli", "museum", "gallery", "ice cream shop", "pizzeria", "subway entrance", "train carriage", "bus interior", "train interior", "office lobby",
112
+ "conference room", "restaurant kitchen", "coffee bar", "shopping street", "nightclub", "bar", "club", "dance floor", "music festival",
113
+ "rooftop party", "late-night street party", "party", "summer party", "beach party", "dance club", "strip club", "rave club", "bar counter"
114
+ ],
115
+
116
+ "setting:party": [
117
+ "nightclub", "bar", "club", "dance floor", "music festival",
118
+ "rooftop party", "late-night street party", "party", "summer party", "beach party", "dance club", "strip club", "rave club", "bar counter",
119
+ ],
120
+
121
+ "setting:water": [
122
+ "beach", "seashore", "lake shore", "riverbank", "swimming pool", "private pool", "poolside",
123
+ "deck by the pool", "beach lounge", "hot tub", "jacuzzi",
124
+ ],
125
+
126
+ "setting:underwater": [
127
+ "pool", "jacuzzi", "hot tub", "spa pool", "sea", "lake", "river",
128
+ ],
129
+
130
+ "hair": [
131
+ "bald", "short hair", "medium hair", "long hair", "man bun", "ponytail", "crew cut", "undercut", "side part", "spiky hair", "messy hair",
132
+ "curly hair", "wavy hair", "straight hair",
133
+ ],
134
+
135
+ "accessories": [
136
+ "earrings", "stud earrings", "diamond stud earrings", "hoop earrings", "small hoop earrings", "septum piercing", "eyebrow piercing",
137
+ "chain necklace", "beaded necklace", "pendant necklace", "sunglasses", "aviator sunglasses", "wayfarer sunglasses", "sports sunglasses",
138
+ "headphones", "earphones",
139
+ ],
140
+
141
+ "hairy:face": [
142
+ "beard", "goatee", "soul patch", "sideburns", "stubble", "full beard", "short beard", "long beard", "chin strap", "van dyke", "mutton chops", "scruffy beard", "designer stubble",
143
+ ],
144
+
145
+ "hairy:body": [
146
+ "chest hair", "armpit hair", "happy trail", "pubic hair",
147
+ "chest hair + armpit hair", "chest hair + happy trail", "chest hair + pubic hair", "armpit hair + happy trail", "armpit hair + pubic hair",
148
+ "happy trail + pubic hair", "chest hair + armpit hair + happy trail", "chest hair + armpit hair + pubic hair", "chest hair + happy trail + pubic hair",
149
+ "armpit hair + happy trail + pubic hair", "chest hair + armpit hair + happy trail + pubic hair",
150
+ ],
151
+
152
+ "body": [
153
+ "very skinny", "lean", "fit", "toned", "athletic", "muscular", "broad-shouldered", "stocky", "solid", "heavily muscled", "chubby", "big and muscular", "obese",
154
+ ],
155
+
156
+ "underwear": [
157
+ "boxer briefs", "briefs", "boxers", "trunks", "thong", "g-string", "string thong", "jockstrap", "low-rise briefs", "mid-rise briefs",
158
+ "high-rise briefs", "athletic briefs",
159
+ ],
160
+
161
+ "sex:anal": [
162
+ "mating press", "chair position", "cowgirl position", "doggystyle", "leg glider position", "mastery position",
163
+ "Spoon Position", "reverse missionary position", "missionary position", "reverse cowgirl position",
164
+ "anvil Position", "guard Position", "stand and carry Position", "table lotus position"
165
+ ],
166
+
167
+ "sex:oral": [
168
+ "69 position", "kneeling oral position", "sideways oral", "penis lick", "tongue in foreskin", "deepthroath", "tongue out blowjob", "irrumatio",
169
+ "ball lick", "kneeling and blow position", "lying and blow position", "north pole position", "sit and blow position",
170
+ ],
171
+
172
+ "topwear:under": [
173
+ "tank top", "tank top", "loose tank top, extended armholes, draped sleeveless shirt", "oversized muscle tank, baggy sleeveless top, open armholes",
174
+ "t-shirt", "crew-neck t-shirt", "v-neck t-shirt", "sleeveless shirt", "cotton undershirt",
175
+ ],
176
+
177
+ "topwear:casual": [
178
+ "long-sleeve t-shirt", "crew-neck long-sleeve shirt", "v-neck long-sleeve shirt", "henley long-sleeve", "hoodie",
179
+ "sweatshirt", "zip-up hoodie", "pullover sweater", "thermal shirt", "flannel shirt",
180
+ ],
181
+
182
+ "topwear:formal": [
183
+ "button-up long-sleeve shirt", "collared shirt", "dress shirt", "oxford shirt", "polo shirt", "unbuttoned shirt, flannel shirt,"
184
+ ],
185
+
186
+ "topwear:party": [
187
+ "mesh tank top", "mesh shirt", "harness", "cage top", "leather vest", "rubber shirt", "tight tank top", "open shirt", "crop top",
188
+ "fishnet top", "bondage harness", "strappy top", "latex shirt", "transparent shirt", "studded vest", "festival top", "topless", "topless",
189
+ ],
190
+
191
+ "bottomwear:formal": [
192
+ "jeans", "chinos", "khaki pants", "linen trousers", "cotton trousers", "dress trousers", "slacks", "wool trousers", "formal pants",
193
+ ],
194
+
195
+ "bottomwear:casual": [
196
+ "joggers", "sweatpants", "track pants", "gym shorts", "shorts", "linen shorts", "bermuda shorts", "cargo pants", "basketball shorts", "training pants",
197
+ ],
198
+
199
+ "bottomwear:party": [
200
+ "camo pants", "leather pants", "rubber pants", "cargo pants", "denim pants", "tight jeans", "distressed jeans", "ripped jeans", "patent leather pants",
201
+ "bondage pants", "festival trousers", "shiny pants", "studded pants", "paint-splatter pants", "metallic pants", "faux leather pants", "tight cargo pants",
202
+ "plaid pants",
203
+ ],
204
+
205
+ "light": [
206
+ "morning", "late morning", "noon", "early afternoon", "afternoon", "late afternoon", "evening", "dusk", "twilight", "sunrise", "sunset",
207
+ "day", "midday sun", "night", "midnight", "pre-dawn", "overcast", "cloudy", "foggy", "misty", "hazy", "dim light", "soft light", "ambient light",
208
+ "natural light", "diffused light", "soft daylight", "warm light", "cool light", "golden hour", "blue hour", "soft morning light", "soft evening light",
209
+ "fading light", "gentle light", "muted light", "soft shadows", "soft glow",
210
+ ],
211
+
212
+ "perspective": [
213
+ "slightly low angle", "slightly high angle", "subtle birds-eye view", "gentle worm's-eye view", "slightly tilted", "soft dutch angle",
214
+ "subtle foreshortening", "soft overhead view", "slight top-down view", "gentle angled view", "slight perspective shift", "slightly slanted composition",
215
+ "soft three-quarter view", "slightly off-center view", "soft angled composition", "slightly tilted horizon", "subtle dynamic angle", "soft wide angle",
216
+ "centered composition", "neutral angle", "straight-on view", "slight zoom-in", "slight zoom-out", "slightly raised angle", "slightly lowered angle",
217
+ "gentle framing", "balanced composition", "softly framed subject", "slightly front-on", "slightly side-on", "soft mid-shot angle", "gentle medium shot",
218
+ "slightly elevated viewpoint", "slightly lowered viewpoint",
219
+ ],
220
+
221
+ "effect": [
222
+ "grainy", "bokeh", "soft focus", "motion blur", "depth of field", "slight vignette", "subtle glow", "diffused light", "dusty",
223
+ "hazy", "slight fog", "light haze", "soft shadows", "backlight glow", "atmospheric haze", "slight bloom", "color gradient", "warm tone",
224
+ "cool tone", "slight desaturation", "light mist", "soft contrast", "light diffusion", "soft highlight", "subtle reflection", "ambient occlusion",
225
+ "soft rim light", "light scattering", "faded edges", "gentle flare", "soft vignette", "soft bokeh", "blurred background", "slight overexposure",
226
+ "slight underexposure", "faint glow", "soft illumination", "dust particles", "floating dust", "light specks", "tiny particles", "airborne dust",
227
+ "dust motes", "light haze with particles", "soft smoke", "pollen particles", "floating motes", "misty particles", "ambient dust", "soft airborne light particles",
228
+ ],
229
+
230
+ "face": [
231
+ "flirty", "seductive", "playful flirt", "teasing look", "sultry gaze", "wink flirt", "one eye closed", "smoldering look", "cheeky flirt", "suggestive grin",
232
+ "mischievous smirk", "playful smirk", "tongue out flirty", "open mouth flirt", "eye contact flirt", "raised eyebrow flirt", "smiling", "grinning", "laughing", "happy",
233
+ "joyful", "playful", "quirky", "cheerful", "friendly smile", "tongue out", "winking", "raised eyebrows", "blushing", "embarrassed", "shy", "bashful", "surprised",
234
+ "curious", "amused", "satisfied smile", "soft smile", "teasing smile", "cheeky grin", "slight smirk", "mischievous grin", "open mouth smile", "excited", "delighted",
235
+ "flirty", "seductive", "playful flirt", "teasing look", "sultry gaze", "wink flirt",
236
+ ],
237
+
238
+ "color": [
239
+ "red", "scarlet", "crimson", "pink", "magenta", "fuchsia", "orange", "tangerine", "yellow", "bright yellow", "lemon yellow color", "gold color", "green", "lime green color",
240
+ "emerald", "olive", "teal", "turquoise", "cyan", "blue", "sky blue", "royal blue", "navy blue", "indigo", "purple", "violet", "lavender", "lilac", "brown", "tan",
241
+ "beige", "bronze", "maroon", "burgundy", "white", "ivory", "black", "grey", "dark-grey", "light-grey", "silver", "reflecting chrome", "copper", "mint", "jade",
242
+ "peach color", "camo", "camouflage", "red-violet", "blue-green", "turquoise-blue", "yellow-orange", "pink-purple", "mustard color",
243
+ ],
244
+ }
245
+
246
+ def apply_scratchpad(prompt: str) -> str:
247
+ """Korvaa [tagi] scratchpadin vaihtoehdoilla satunnaisesti.
248
+ Jos tagia ei löydy, poistetaan hakasulkeet kokonaan.
249
+ """
250
+ matches = re.findall(r"\[(.+?)\]", prompt)
251
+ for tag in matches:
252
+ if tag in scratchpad:
253
+ choice = random.choice(scratchpad[tag])
254
+ # korvataan ilman hakasulkeita
255
+ prompt = prompt.replace(f"[{tag}]", choice, 1)
256
+ else:
257
+ # poistetaan tuntemattomat tagit
258
+ prompt = prompt.replace(f"[{tag}]", "", 1)
259
+ return prompt.strip()
260
+
261
+
262
+ resolutions = [
263
+ (592, 1768), (608, 1696), (640, 1624), (672, 1544),
264
+ (720, 1440), (744, 1392), (784, 1320), (832, 1248),
265
+ (864, 1208), (880, 1184), (912, 1144), (976, 1072),
266
+ (1024, 1024), (1072, 912), (1144, 912), (1184, 880),
267
+ (1208, 864), (1248, 832), (1320, 784), (1392, 744),
268
+ (1440, 720), (1544, 672), (1624, 640), (1696, 608),
269
+ (1768, 592),
270
+ (720, 1440), (744, 1392), (784, 1320), (832, 1248),
271
+ (864, 1208), (880, 1184), (912, 1144), (976, 1072),
272
+ (1024, 1024), (1072, 912), (1144, 912), (1184, 880),
273
+ (1208, 864), (1248, 832), (1320, 784),
274
+ (880, 1184), (912, 1144), (976, 1072),
275
+ (1024, 1024), (1072, 912),
276
+ (912, 1144), (976, 1072),
277
+ (1024, 1024),
278
+ ]
279
+
280
+
281
+ @spaces.GPU
282
+ def generate(prompt, negative_prompt, width, height, random_res, selected_style):
283
+ if random_res:
284
+ width, height = random.choice(resolutions)
285
+
286
+ # Expandataan scratchpad-tagit
287
+ prompt = apply_scratchpad(prompt)
288
+
289
+ # Rakennetaan listat aktiivisista adaptereista ja niiden painoista
290
+ adapter_names = []
291
+ adapter_weights = []
292
+
293
+ # 1) Pysyvät LoRAt
294
+ for name, (_, w) in PERSISTENT_LORAS.items():
295
+ adapter_names.append(name)
296
+ adapter_weights.append(w)
297
+
298
+ # 2) Tyyli-LoRA + trigger
299
+ if selected_style in STYLE_LORAS and selected_style != "None":
300
+ repo, style_w, trigger, style_adapter = STYLE_LORAS[selected_style]
301
+ prompt = f"{trigger}, {prompt}"
302
+ adapter_names.append(style_adapter)
303
+ adapter_weights.append(style_w) # esim. 7.0 jos haluat “mössöä”
304
+ # jos "None", ei lisätä tyyliadapteria
305
+
306
+ # Varmuuden vuoksi: ei fuseta, vaan käytetään dynaamisia painoja
307
+ # Jos olet joskus fusennut, nollaa se ensin:
308
+ try:
309
+ pipe.unfuse_lora()
310
+ except Exception:
311
+ pass
312
+
313
+ pipe.set_adapters(adapter_names, adapter_weights=adapter_weights)
314
+
315
+ quality_suffix = (
316
+ ", mikus-style, no lines, by bakemonoy, by chunie, by meesh, (anthro), (male), (best quality), high resolution, (ultra detailed),"
317
+ " 8k, (highly detailed), (masterpiece), (sharp focus), (intricate details),"
318
+ " (perfect anatomy), (depth of field), high dynamic range, (smooth shading),"
319
+ " (realistic shadows), (rich texture), professional color grading, (fine details),"
320
+ " ultra sharp, HDR, (anatomically correct)"
321
+ )
322
+
323
+ full_prompt = prompt + quality_suffix
324
+
325
+ image = pipe(
326
+ prompt=full_prompt,
327
+ negative_prompt=negative_prompt,
328
+ width=width,
329
+ height=height,
330
+ num_inference_steps=35,
331
+ guidance_scale=7.5
332
+ ).images[0]
333
+
334
+ # (Valinnainen) palautetaan tekstiin näkyviin mitkä adapterit ja painot oli käytössä
335
+ used = ", ".join([f"{n}:{w}" for n, w in zip(adapter_names, adapter_weights)])
336
+ return image, f"{full_prompt}\n\n[adapters] {used}"
337
+
338
+ # UI sama kuin ennen
339
+ gr.Interface(
340
+ fn=generate,
341
+ inputs=[
342
+ gr.Textbox(label="Prompt"),
343
+ gr.Textbox(
344
+ label="Negative Prompt",
345
+ value="(worst quality), (low quality), (blurry), (bad anatomy), (fused fingers), (extra fingers), (missing fingers), (deformed), (jpeg artifacts), (watermark), (signature), text, error, out of frame, bad hands, bad feet, bad proportions, fused limbs, cropped, username, logo, bad perspective, lowres, overexposure, bad artist, bad composition, distorted, oversaturated, mutated, bad shadow, multiple limbs, extra arms, extra legs, bad background, tilted, bad lighting, bad face, ugly, bad eyes, disfigured, multiple pictures"
346
+ ),
347
+ gr.Slider(minimum=512, maximum=1024, step=64, value=768, label="Width"),
348
+ gr.Slider(minimum=512, maximum=1024, step=64, value=768, label="Height"),
349
+ gr.Checkbox(label="Random resolution mode (override sliders)", value=True),
350
+ gr.Dropdown(
351
+ choices=list(STYLE_LORAS.keys()),
352
+ value="None",
353
+ label="Select Style"
354
+ )
355
+ ],
356
+ outputs=[
357
+ gr.Image(label="Generated Image"),
358
+ gr.Textbox(label="Used Prompt", lines=6)
359
+ ],
360
+ title="FURRYSTYLE",
361
+ description="Give a prompt"
362
+ ).launch()
gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
requirements.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ torch
2
+ diffusers[torch]
3
+ transformers
4
+ accelerate
5
+ safetensors
6
+ gradio
7
+ spaces
8
+ peft