Upload folder using huggingface_hub
Browse files- Danimls_model/Loras/daniml_V2_Astronaut.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_alpaca.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_badger.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_cryptonerdV2.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_fox.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_gangsterV2.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_hazmat.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_katana.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_lowpoly.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_mech.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_monkey.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_pig.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_pistol.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_rat.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_samurai.safetensors +3 -0
- Danimls_model/Loras/daniml_V2_wizard.safetensors +3 -0
- Danimls_model/Loras/daniml_background.safetensors +3 -0
- Danimls_model/README.md +75 -0
- Danimls_model/__pycache__/app.cpython-313.pyc +0 -0
- Danimls_model/app.py +52 -0
- Danimls_model/requirements.txt +7 -0
- Lora/daniml_V2_Astronaut.safetensors +3 -0
- Lora/daniml_V2_alpaca.safetensors +3 -0
- Lora/daniml_V2_badger.safetensors +3 -0
- Lora/daniml_V2_cryptonerdV2.safetensors +3 -0
- Lora/daniml_V2_fox.safetensors +3 -0
- Lora/daniml_V2_gangsterV2.safetensors +3 -0
- Lora/daniml_V2_hazmat.safetensors +3 -0
- Lora/daniml_V2_katana.safetensors +3 -0
- Lora/daniml_V2_lowpoly.safetensors +3 -0
- Lora/daniml_V2_mech.safetensors +3 -0
- Lora/daniml_V2_monkey.safetensors +3 -0
- Lora/daniml_V2_pig.safetensors +3 -0
- Lora/daniml_V2_pistol.safetensors +3 -0
- Lora/daniml_V2_rat.safetensors +3 -0
- Lora/daniml_V2_samurai.safetensors +3 -0
- Lora/daniml_V2_wizard.safetensors +3 -0
- Lora/daniml_background.safetensors +3 -0
- alpacabot(Backup).py +166 -0
- bot.py +101 -0
Danimls_model/Loras/daniml_V2_Astronaut.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f73d8a9e056d4310b13b6678182f819e38f49a9d3042d71373f012d9265f0a3f
|
| 3 |
+
size 18989512
|
Danimls_model/Loras/daniml_V2_alpaca.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:96c32b36bfb89f4375a19fed2ba76b43c78ceef6dece73ac026d300010217aa2
|
| 3 |
+
size 18993472
|
Danimls_model/Loras/daniml_V2_badger.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b51f62d45f49b725602b5113ded529edff99f4036426f1d4317a80f32c1c8a78
|
| 3 |
+
size 18993536
|
Danimls_model/Loras/daniml_V2_cryptonerdV2.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a0cc116a013efa127d978c0a84a8c63728acd0dd62e8cd23ecafca7736191c1
|
| 3 |
+
size 18991280
|
Danimls_model/Loras/daniml_V2_fox.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ed063c08795fd4e5161233e2a4aae22f4cd5c7d5fbeadf5053250fc5bdd7d6f
|
| 3 |
+
size 18993096
|
Danimls_model/Loras/daniml_V2_gangsterV2.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03534a484b77643fb3bfcda1496d24b3c5c9ded7177e8a265428c6c75ad2e327
|
| 3 |
+
size 18989736
|
Danimls_model/Loras/daniml_V2_hazmat.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:868faaa771d7190b4ce2599657e0253257b904adc85319b0fe1918d5febc5b11
|
| 3 |
+
size 18989816
|
Danimls_model/Loras/daniml_V2_katana.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1ffba173a485cc96e892e3bdb1a58113eb2f4b42577020d646543496eff4cf6
|
| 3 |
+
size 18989632
|
Danimls_model/Loras/daniml_V2_lowpoly.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae75cc2ec08110ab9a338402cd2ef914338bcd473edb58308fca9b0cf7547837
|
| 3 |
+
size 18992624
|
Danimls_model/Loras/daniml_V2_mech.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab11cd02b8fcf872ead065de0fcf9d15b2b6950a7a1f15561738fcaf65b3315a
|
| 3 |
+
size 18989640
|
Danimls_model/Loras/daniml_V2_monkey.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d53342664dce359893cd4f8c8ffd3b42c6da8aa31498cc287658d686bad59ace
|
| 3 |
+
size 18993640
|
Danimls_model/Loras/daniml_V2_pig.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bde33aeb897a00f6e99c7365b2e13fe1aa2ba216f7c6621caf9d4eb1338c1ad7
|
| 3 |
+
size 18992864
|
Danimls_model/Loras/daniml_V2_pistol.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fbad9443b68f2b90d72f849d6dc9ee2a87cbcc02782f3ce7c420654cc541bf19
|
| 3 |
+
size 18989544
|
Danimls_model/Loras/daniml_V2_rat.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:58d1c4784e31993b5741a33b2ac52040d188347ca72c72876b0f6dc95a946b3a
|
| 3 |
+
size 18995008
|
Danimls_model/Loras/daniml_V2_samurai.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6471a7868fa4d5c660b1b046b7c2df59e5f1bf6c6f582977e0a75af36c7831c4
|
| 3 |
+
size 18989728
|
Danimls_model/Loras/daniml_V2_wizard.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d1ae6e27ce0eec33902a65750a4fa277837bde0b06fe210d9577f9dd2def72c9
|
| 3 |
+
size 18989744
|
Danimls_model/Loras/daniml_background.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec2a5540d680822d9152e607a36d7167084c090f21263ea9a5efd3f8461ba2a9
|
| 3 |
+
size 18992456
|
Danimls_model/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# DANIMLS-V1: Stylized Cyberpunk Animal Generator
|
| 3 |
+
|
| 4 |
+
**Creator**: [@Bootz_of_Truth](https://x.com/Bootz_of_Truth)
|
| 5 |
+
**Hosted via**: [Modelz / Alpaca Network](https://modelz.io/CryptoBootz/Danimls-V1)
|
| 6 |
+
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## 🔧 Model Description
|
| 10 |
+
|
| 11 |
+
DANIMLS-V1 is a stylized **text-to-image Stable Diffusion pipeline** trained on custom anthropomorphic animal art in a **cyberpunk Tokyo aesthetic**, using multiple LoRA adapters for species, background, and outfit styles.
|
| 12 |
+
|
| 13 |
+
- **Base Model**: `runwayml/stable-diffusion-v1-5`
|
| 14 |
+
- **LoRA Format**: `.safetensors`
|
| 15 |
+
- **Framework**: `diffusers`, `transformers`, `torch`, `xformers`
|
| 16 |
+
- **Precision**: `float32` for CPU testing, `float16` for GPU deployment
|
| 17 |
+
- **Safety Checker**: Disabled (filtered via LoRA style constraints)
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## 🧩 LoRAs Included
|
| 22 |
+
|
| 23 |
+
- Animals:
|
| 24 |
+
- `daniml_V2_alpaca.safetensors`
|
| 25 |
+
- `daniml_V2_badger.safetensors`
|
| 26 |
+
- `daniml_V2_fox.safetensors`
|
| 27 |
+
- `daniml_V2_pig.safetensors`
|
| 28 |
+
- `daniml_V2_rat.safetensors`
|
| 29 |
+
- `daniml_V2_monkey.safetensors`
|
| 30 |
+
- Background:
|
| 31 |
+
- `daniml_background.safetensors`
|
| 32 |
+
- Styles:
|
| 33 |
+
- `daniml_V2_wizard.safetensors`
|
| 34 |
+
- `daniml_V2_gangsterV2.safetensors`
|
| 35 |
+
- `daniml_V2_samurai.safetensors`
|
| 36 |
+
- `daniml_V2_cryptonerdV2.safetensors`
|
| 37 |
+
- `daniml_V2_lowpoly.safetensors`
|
| 38 |
+
- `daniml_V2_hazmat.safetensors`
|
| 39 |
+
- `daniml_V2_mech.safetensors`
|
| 40 |
+
- `daniml_V2_business.safetensors`
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
## 🧪 Example Inference (Python)
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
from diffusers import StableDiffusionPipeline
|
| 48 |
+
import torch
|
| 49 |
+
|
| 50 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
| 51 |
+
"./danimls_model",
|
| 52 |
+
torch_dtype=torch.float32, # use float16 for GPU
|
| 53 |
+
safety_checker=None,
|
| 54 |
+
).to("cpu") # or "cuda" if available
|
| 55 |
+
|
| 56 |
+
prompt = "stylized anthropomorphic monkey, wizard robe, floating orbs, cyberpunk Tokyo rooftop"
|
| 57 |
+
image = pipe(prompt).images[0]
|
| 58 |
+
image.save("wizard_monkey.png")
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
## ⚖️ License & Intended Use
|
| 64 |
+
|
| 65 |
+
- **License**: CreativeML Open RAIL-M
|
| 66 |
+
- **Intended Use**: Creative projects, AI art, NFT generation, cyberpunk aesthetics
|
| 67 |
+
- **Not for**: Realism, photo restoration, NSFW content
|
| 68 |
+
|
| 69 |
+
---
|
| 70 |
+
|
| 71 |
+
## 🌐 Credits & Hosting
|
| 72 |
+
|
| 73 |
+
DANIMLS-V1 is deployed through the **Modelz** platform and will be served onchain by **Alpaca Network** once Singularity is reached.
|
| 74 |
+
|
| 75 |
+
> For more details and to access the Telegram bot, visit: [modelz.io/CryptoBootz/Danimls-V1](https://modelz.io/CryptoBootz/Danimls-V1)
|
Danimls_model/__pycache__/app.cpython-313.pyc
ADDED
|
Binary file (3.51 kB). View file
|
|
|
Danimls_model/app.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
from fastapi import FastAPI, HTTPException
|
| 3 |
+
from pydantic import BaseModel
|
| 4 |
+
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
| 5 |
+
from safetensors.torch import load_file
|
| 6 |
+
import torch
|
| 7 |
+
from PIL import Image
|
| 8 |
+
import base64
|
| 9 |
+
import io
|
| 10 |
+
import os
|
| 11 |
+
|
| 12 |
+
app = FastAPI()
|
| 13 |
+
|
| 14 |
+
# Initialize the model
|
| 15 |
+
base_model = "runwayml/stable-diffusion-v1-5"
|
| 16 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
| 17 |
+
base_model,
|
| 18 |
+
torch_dtype=torch.float32,
|
| 19 |
+
safety_checker=None,
|
| 20 |
+
feature_extractor=None,
|
| 21 |
+
use_safetensors=True
|
| 22 |
+
).to("cpu")
|
| 23 |
+
|
| 24 |
+
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
| 25 |
+
|
| 26 |
+
def apply_lora(pipeline, lora_path, weight=0.6):
|
| 27 |
+
state_dict = load_file(lora_path)
|
| 28 |
+
compatible = {k: v for k, v in state_dict.items() if k in pipeline.unet.state_dict()}
|
| 29 |
+
pipeline.unet.load_state_dict(compatible, strict=False)
|
| 30 |
+
|
| 31 |
+
class GenerationRequest(BaseModel):
|
| 32 |
+
prompt: str
|
| 33 |
+
loras: list[str]
|
| 34 |
+
weights: list[float]
|
| 35 |
+
|
| 36 |
+
@app.post("/generate")
|
| 37 |
+
def generate_image(request: GenerationRequest):
|
| 38 |
+
try:
|
| 39 |
+
for idx, lora_name in enumerate(request.loras):
|
| 40 |
+
weight = request.weights[idx] if idx < len(request.weights) else 0.6
|
| 41 |
+
lora_path = os.path.join("loras", lora_name + ".safetensors")
|
| 42 |
+
if not os.path.exists(lora_path):
|
| 43 |
+
raise HTTPException(status_code=404, detail=f"LoRA not found: {lora_name}")
|
| 44 |
+
apply_lora(pipe, lora_path, weight)
|
| 45 |
+
|
| 46 |
+
image = pipe(request.prompt, num_inference_steps=30, guidance_scale=7.5).images[0]
|
| 47 |
+
buffered = io.BytesIO()
|
| 48 |
+
image.save(buffered, format="PNG")
|
| 49 |
+
img_str = base64.b64encode(buffered.getvalue()).decode("utf-8")
|
| 50 |
+
return {"image_base64": img_str}
|
| 51 |
+
except Exception as e:
|
| 52 |
+
raise HTTPException(status_code=500, detail=str(e))
|
Danimls_model/requirements.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fastapi
|
| 2 |
+
uvicorn
|
| 3 |
+
diffusers
|
| 4 |
+
transformers
|
| 5 |
+
torch
|
| 6 |
+
safetensors
|
| 7 |
+
Pillow
|
Lora/daniml_V2_Astronaut.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f73d8a9e056d4310b13b6678182f819e38f49a9d3042d71373f012d9265f0a3f
|
| 3 |
+
size 18989512
|
Lora/daniml_V2_alpaca.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:96c32b36bfb89f4375a19fed2ba76b43c78ceef6dece73ac026d300010217aa2
|
| 3 |
+
size 18993472
|
Lora/daniml_V2_badger.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b51f62d45f49b725602b5113ded529edff99f4036426f1d4317a80f32c1c8a78
|
| 3 |
+
size 18993536
|
Lora/daniml_V2_cryptonerdV2.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a0cc116a013efa127d978c0a84a8c63728acd0dd62e8cd23ecafca7736191c1
|
| 3 |
+
size 18991280
|
Lora/daniml_V2_fox.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ed063c08795fd4e5161233e2a4aae22f4cd5c7d5fbeadf5053250fc5bdd7d6f
|
| 3 |
+
size 18993096
|
Lora/daniml_V2_gangsterV2.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03534a484b77643fb3bfcda1496d24b3c5c9ded7177e8a265428c6c75ad2e327
|
| 3 |
+
size 18989736
|
Lora/daniml_V2_hazmat.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:868faaa771d7190b4ce2599657e0253257b904adc85319b0fe1918d5febc5b11
|
| 3 |
+
size 18989816
|
Lora/daniml_V2_katana.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1ffba173a485cc96e892e3bdb1a58113eb2f4b42577020d646543496eff4cf6
|
| 3 |
+
size 18989632
|
Lora/daniml_V2_lowpoly.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae75cc2ec08110ab9a338402cd2ef914338bcd473edb58308fca9b0cf7547837
|
| 3 |
+
size 18992624
|
Lora/daniml_V2_mech.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab11cd02b8fcf872ead065de0fcf9d15b2b6950a7a1f15561738fcaf65b3315a
|
| 3 |
+
size 18989640
|
Lora/daniml_V2_monkey.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d53342664dce359893cd4f8c8ffd3b42c6da8aa31498cc287658d686bad59ace
|
| 3 |
+
size 18993640
|
Lora/daniml_V2_pig.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bde33aeb897a00f6e99c7365b2e13fe1aa2ba216f7c6621caf9d4eb1338c1ad7
|
| 3 |
+
size 18992864
|
Lora/daniml_V2_pistol.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fbad9443b68f2b90d72f849d6dc9ee2a87cbcc02782f3ce7c420654cc541bf19
|
| 3 |
+
size 18989544
|
Lora/daniml_V2_rat.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:58d1c4784e31993b5741a33b2ac52040d188347ca72c72876b0f6dc95a946b3a
|
| 3 |
+
size 18995008
|
Lora/daniml_V2_samurai.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6471a7868fa4d5c660b1b046b7c2df59e5f1bf6c6f582977e0a75af36c7831c4
|
| 3 |
+
size 18989728
|
Lora/daniml_V2_wizard.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d1ae6e27ce0eec33902a65750a4fa277837bde0b06fe210d9577f9dd2def72c9
|
| 3 |
+
size 18989744
|
Lora/daniml_background.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec2a5540d680822d9152e607a36d7167084c090f21263ea9a5efd3f8461ba2a9
|
| 3 |
+
size 18992456
|
alpacabot(Backup).py
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from telegram import InputMediaPhoto
|
| 2 |
+
|
| 3 |
+
import os
|
| 4 |
+
import base64
|
| 5 |
+
import random
|
| 6 |
+
from datetime import datetime
|
| 7 |
+
import requests
|
| 8 |
+
from io import BytesIO
|
| 9 |
+
from telegram import Update
|
| 10 |
+
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes
|
| 11 |
+
|
| 12 |
+
BOT_TOKEN = "7584662674:AAGO3YzvG6-bG6nvvBAc_r1Nmr0D8JsUSfY"
|
| 13 |
+
A1111_URL = "http://127.0.0.1:7860"
|
| 14 |
+
|
| 15 |
+
animal_loras = [
|
| 16 |
+
("daniml_V2_alpaca", 0.5),
|
| 17 |
+
("daniml_V2_badger", 0.5),
|
| 18 |
+
("daniml_V2_fox", 0.5),
|
| 19 |
+
("daniml_V2_monkey", 0.5),
|
| 20 |
+
("daniml_V2_pig", 0.5),
|
| 21 |
+
("daniml_V2_rat", 0.5),
|
| 22 |
+
]
|
| 23 |
+
|
| 24 |
+
style_traits = {
|
| 25 |
+
"daniml_V2_gangsterV2": ["black hoodie (hood down)", "sweatpants", "gold chain", "aviators"],
|
| 26 |
+
"daniml_V2_cryptonerdV2": ["khakis", "crypto hoodie", "vr headset", "smartwatch", "coins"],
|
| 27 |
+
"daniml_V2_samurai": ["samurai robe", "katana", "shoulder armor", "forearm wrap"],
|
| 28 |
+
"daniml_V2_Astronaut": ["astronaut suit"],
|
| 29 |
+
"daniml_V2_hazmat": ["hazmat suit", "cyan biohazard symbol"],
|
| 30 |
+
"daniml_V2_mech": ["mech suit"],
|
| 31 |
+
"daniml_V2_lowpoly": ["low poly"]
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
style_loras = [
|
| 35 |
+
("daniml_V2_cryptonerdV2", 0.8),
|
| 36 |
+
("daniml_V2_gangsterV2", 0.8),
|
| 37 |
+
("daniml_V2_samurai", 0.8),
|
| 38 |
+
("daniml_V2_Astronaut", 0.8),
|
| 39 |
+
("daniml_V2_lowpoly", 0.8),
|
| 40 |
+
("daniml_V2_hazmat", 0.8),
|
| 41 |
+
("daniml_V2_mech", 0.65),
|
| 42 |
+
]
|
| 43 |
+
|
| 44 |
+
background_lora = ("daniml_background", 0.2)
|
| 45 |
+
|
| 46 |
+
prompt_buckets = [
|
| 47 |
+
"alley, cracked pavement, graffiti wall, neon kanji signs",
|
| 48 |
+
"rooftop, vents, loose wires, neon graffiti, skyline haze",
|
| 49 |
+
"tunnel, cracked tiles, green neon lighting, graffiti everywhere",
|
| 50 |
+
"alley wall, layered street art, magenta neon glow, wet ground",
|
| 51 |
+
"rooftop, rusted pipes, green haze, cracked concrete",
|
| 52 |
+
"alley, vending machine glow, crumbling walls, neon posters",
|
| 53 |
+
"side street, cracked cement, glowing kanji signs, mist and trash",
|
| 54 |
+
"alley, graffiti wall both sides, purple lighting, puddles",
|
| 55 |
+
"Tokyo alley, glowing pink signage, broken pavement, foggy atmosphere",
|
| 56 |
+
]
|
| 57 |
+
|
| 58 |
+
async def styles(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
| 59 |
+
await update.message.reply_text(
|
| 60 |
+
"🧬 Available DANIML Styles:\n"
|
| 61 |
+
"- Gangster\n"
|
| 62 |
+
"- Crypto Nerd\n"
|
| 63 |
+
"- Samurai\n"
|
| 64 |
+
"- Astronaut\n"
|
| 65 |
+
"- Hazmat\n"
|
| 66 |
+
"- Mech Pilot\n"
|
| 67 |
+
"- Low Poly"
|
| 68 |
+
)
|
| 69 |
+
|
| 70 |
+
async def animals(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
| 71 |
+
await update.message.reply_text(
|
| 72 |
+
"🦙 Supported Animals:\n"
|
| 73 |
+
"- Alpaca\n"
|
| 74 |
+
"- Badger\n"
|
| 75 |
+
"- Fox\n"
|
| 76 |
+
"- Monkey\n"
|
| 77 |
+
"- Pig\n"
|
| 78 |
+
"- Rat"
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
def build_prompt(animal_lora, animal_weight, style_lora, style_weight):
|
| 82 |
+
background_prompt = random.choice(prompt_buckets)
|
| 83 |
+
lora_string = f"<lora:{background_lora[0]}:{background_lora[1]}> <lora:{animal_lora}:{animal_weight}>"
|
| 84 |
+
|
| 85 |
+
trait_description = ""
|
| 86 |
+
if style_lora:
|
| 87 |
+
lora_string += f" <lora:{style_lora}:{style_weight}>"
|
| 88 |
+
trait_pool = style_traits.get(style_lora, [])
|
| 89 |
+
selected_traits = trait_pool # use all traits as core traits
|
| 90 |
+
trait_description = ", ".join(selected_traits)
|
| 91 |
+
|
| 92 |
+
animal_name = animal_lora.replace("daniml_V2_", "")
|
| 93 |
+
full_prompt = f"{lora_string} cyberpunk anthropomorphic {animal_name}, {trait_description}, {background_prompt}, gritty neon lighting"
|
| 94 |
+
return full_prompt
|
| 95 |
+
|
| 96 |
+
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
| 97 |
+
await update.message.reply_text(
|
| 98 |
+
"Welcome to DANIML Gen 🦙🔌\n\n"
|
| 99 |
+
"Your gateway to cyberpunk animal PFPs — each one AI-crafted, neon-lit, and ready to mint.\n\n"
|
| 100 |
+
"Type /gen to roll the dice.\n"
|
| 101 |
+
"Type /alpaca if you know what’s good.\n\n"
|
| 102 |
+
"Drip is eternal. Mint your inner animal.⚡"
|
| 103 |
+
)
|
| 104 |
+
|
| 105 |
+
async def generate_image(update: Update, context: ContextTypes.DEFAULT_TYPE, animal_override=None):
|
| 106 |
+
try:
|
| 107 |
+
await update.message.reply_text("🛠 Generating your DANIML image set... please wait.")
|
| 108 |
+
animal_lora, animal_weight = random.choice(animal_loras) if not animal_override else (animal_override, 0.4)
|
| 109 |
+
style_lora, style_weight = random.choice(style_loras)
|
| 110 |
+
full_prompt_1 = build_prompt(animal_lora, animal_weight, style_lora, style_weight)
|
| 111 |
+
full_prompt_2 = build_prompt(animal_lora, animal_weight, style_lora, style_weight)
|
| 112 |
+
print(f'Prompt 1: {full_prompt_1}')
|
| 113 |
+
print(f'Prompt 2: {full_prompt_2}')
|
| 114 |
+
media_group = []
|
| 115 |
+
files = []
|
| 116 |
+
for i, prompt in enumerate([full_prompt_1, full_prompt_2]):
|
| 117 |
+
print(f"[DEBUG] Sending to A1111 at {datetime.now()} - Prompt {i+1}")
|
| 118 |
+
print(prompt)
|
| 119 |
+
payload = {
|
| 120 |
+
"prompt": prompt,
|
| 121 |
+
"steps": 30,
|
| 122 |
+
"batch_size": 1,
|
| 123 |
+
"n_iter": 1,
|
| 124 |
+
"width": 768,
|
| 125 |
+
"height": 768,
|
| 126 |
+
}
|
| 127 |
+
res = requests.post(f"{A1111_URL}/sdapi/v1/txt2img", json=payload)
|
| 128 |
+
res.raise_for_status()
|
| 129 |
+
images = res.json().get("images", [])
|
| 130 |
+
if not images or not isinstance(images[0], str):
|
| 131 |
+
await update.message.reply_text("Unexpected image format returned.")
|
| 132 |
+
return
|
| 133 |
+
image_base64 = images[0]
|
| 134 |
+
if image_base64.startswith("data:image"):
|
| 135 |
+
image_base64 = image_base64.split(",", 1)[1]
|
| 136 |
+
img_data = base64.b64decode(image_base64)
|
| 137 |
+
filename = f"output_{i}.png"
|
| 138 |
+
with open(filename, "wb") as f:
|
| 139 |
+
f.write(img_data)
|
| 140 |
+
f = open(filename, "rb")
|
| 141 |
+
files.append(f)
|
| 142 |
+
media_group.append(InputMediaPhoto(f))
|
| 143 |
+
try:
|
| 144 |
+
await update.message.reply_media_group(media_group)
|
| 145 |
+
except Exception as e:
|
| 146 |
+
await update.message.reply_text(f"Send error: {e}")
|
| 147 |
+
for f in files:
|
| 148 |
+
f.close()
|
| 149 |
+
except Exception as e:
|
| 150 |
+
await update.message.reply_text(f"Error: {e}")
|
| 151 |
+
|
| 152 |
+
async def gen(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
| 153 |
+
await generate_image(update, context)
|
| 154 |
+
|
| 155 |
+
async def alpaca(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
| 156 |
+
await generate_image(update, context, "daniml_V2_alpaca")
|
| 157 |
+
app = ApplicationBuilder().token(BOT_TOKEN).build()
|
| 158 |
+
app.add_handler(CommandHandler("gen", gen))
|
| 159 |
+
app.add_handler(CommandHandler("alpaca", alpaca))
|
| 160 |
+
app.add_handler(CommandHandler("start", start))
|
| 161 |
+
app.add_handler(CommandHandler("styles", styles))
|
| 162 |
+
app.add_handler(CommandHandler("animals", animals))
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
print("Bot is running...")
|
| 166 |
+
app.run_polling()
|
bot.py
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import base64
|
| 3 |
+
import random
|
| 4 |
+
import requests
|
| 5 |
+
from io import BytesIO
|
| 6 |
+
from telegram import Update
|
| 7 |
+
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes
|
| 8 |
+
|
| 9 |
+
BOT_TOKEN = "7584662674:AAGO3YzvG6-bG6nvvBAc_r1Nmr0D8JsUSfY"
|
| 10 |
+
A1111_URL = "http://127.0.0.1:7860"
|
| 11 |
+
|
| 12 |
+
# LoRA mappings
|
| 13 |
+
animal_loras = [
|
| 14 |
+
("daniml_V2_alpaca", 0.4),
|
| 15 |
+
("daniml_V2_badger", 0.4),
|
| 16 |
+
("daniml_V2_fox", 0.4),
|
| 17 |
+
("daniml_V2_monkey", 0.4),
|
| 18 |
+
("daniml_V2_pig", 0.4),
|
| 19 |
+
("daniml_V2_rat", 0.4),
|
| 20 |
+
]
|
| 21 |
+
|
| 22 |
+
style_loras = [
|
| 23 |
+
("daniml_V2_cryptonerdV2", 0.6),
|
| 24 |
+
("daniml_V2_gangsterV2", 0.6),
|
| 25 |
+
("daniml_V2_katana", 0.6),
|
| 26 |
+
("daniml_V2_samurai", 0.6),
|
| 27 |
+
("daniml_V2_wizard", 0.6),
|
| 28 |
+
]
|
| 29 |
+
|
| 30 |
+
background_lora = ("daniml_background", 0.2)
|
| 31 |
+
|
| 32 |
+
prompt_buckets = [
|
| 33 |
+
"alley, cracked pavement, graffiti wall, neon kanji signs",
|
| 34 |
+
"rooftop, vents, loose wires, neon graffiti, skyline haze",
|
| 35 |
+
"tunnel, cracked tiles, green neon lighting, graffiti everywhere",
|
| 36 |
+
"alley wall, layered street art, magenta neon glow, wet ground",
|
| 37 |
+
"rooftop, rusted pipes, green haze, cracked concrete",
|
| 38 |
+
"alley, vending machine glow, crumbling walls, neon posters",
|
| 39 |
+
"tunnel, graffiti tunnel, magenta and green lighting, steam rising",
|
| 40 |
+
"side street, cracked cement, glowing kanji signs, mist and trash",
|
| 41 |
+
"alley, graffiti wall both sides, purple lighting, puddles",
|
| 42 |
+
"alley, trash-filled floor, glowing drain cover, misty neon signs",
|
| 43 |
+
"Tokyo alley, glowing pink signage, broken pavement, foggy atmosphere",
|
| 44 |
+
"narrow street with kanji billboards, cracked concrete, trash piles, cyan glow",
|
| 45 |
+
"backstreet tunnel, neon reflections on wet tiles, graffiti panels",
|
| 46 |
+
"rooftop walkway with tagged walls, dim green neon, rusted ducts",
|
| 47 |
+
"urban stairwell, crumbling cement, layered graffiti, purple lighting",
|
| 48 |
+
"service alley, flickering green lights, cracked asphalt, torn posters",
|
| 49 |
+
"subway entrance, steam vents, magenta overhead light, stained tiles",
|
| 50 |
+
"industrial rooftop, loose cables, glowing vents, Tokyo tower in distance",
|
| 51 |
+
"graffiti-covered passageway, deep haze, scattered debris, violet lighting",
|
| 52 |
+
"graffiti tunnel, puddles reflecting red and teal signage, cracked floor"
|
| 53 |
+
]
|
| 54 |
+
|
| 55 |
+
async def gen(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
| 56 |
+
try:
|
| 57 |
+
# Random selections
|
| 58 |
+
background_prompt = random.choice(prompt_buckets)
|
| 59 |
+
animal_lora, animal_weight = random.choice(animal_loras)
|
| 60 |
+
use_style = random.random() < 0.5
|
| 61 |
+
style_lora, style_weight = random.choice(style_loras) if use_style else (None, 0.0)
|
| 62 |
+
|
| 63 |
+
# Compose full LoRA string
|
| 64 |
+
lora_string = f"<lora:{background_lora[0]}:{background_lora[1]}> <lora:{animal_lora}:{animal_weight}>"
|
| 65 |
+
if use_style:
|
| 66 |
+
lora_string += f" <lora:{style_lora}:{style_weight}>"
|
| 67 |
+
|
| 68 |
+
# Extract animal name
|
| 69 |
+
animal_name = animal_lora.replace("daniml_V2_", "")
|
| 70 |
+
|
| 71 |
+
# Prompt setup
|
| 72 |
+
print("🧠 Final prompt:", full_prompt)
|
| 73 |
+
full_prompt = f"{lora_string} cyberpunk anthropomorphic {animal_name}, {background_prompt}, gritty neon lighting"
|
| 74 |
+
payload = {
|
| 75 |
+
"prompt": full_prompt,
|
| 76 |
+
"steps": 30,
|
| 77 |
+
"width": 768,
|
| 78 |
+
"height": 768,
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
res = requests.post(f"{A1111_URL}/sdapi/v1/txt2img", json=payload)
|
| 82 |
+
res.raise_for_status()
|
| 83 |
+
images = res.json()["images"]
|
| 84 |
+
if not images:
|
| 85 |
+
await update.message.reply_text("Generation failed. No image returned.")
|
| 86 |
+
return
|
| 87 |
+
|
| 88 |
+
# Decode and send first image
|
| 89 |
+
img_data = base64.b64decode(images[0])
|
| 90 |
+
with open("output.png", "wb") as f:
|
| 91 |
+
f.write(img_data)
|
| 92 |
+
await update.message.reply_photo(photo=open("output.png", "rb"))
|
| 93 |
+
|
| 94 |
+
except Exception as e:
|
| 95 |
+
await update.message.reply_text(f"Error: {e}")
|
| 96 |
+
|
| 97 |
+
app = ApplicationBuilder().token(BOT_TOKEN).build()
|
| 98 |
+
app.add_handler(CommandHandler("gen", gen))
|
| 99 |
+
|
| 100 |
+
print("Bot is running...")
|
| 101 |
+
app.run_polling()
|