Downloads · 30 days
0
londespoir/Deliberate_Dungeons_and_Dragons_races
Deliberate_Dungeons_and_Dragons_races is a machine learning model from londespoir. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Jun 21, 2024
Repo size
302 MB
Likes
0
Public
Click a slice to open those files.
.safetensors302 MB · 100%
From the Hugging Face model README
##How to use:
import sdkit
from sdkit.generate import generate_images
from sdkit.models import load_model
from sdkit.utils import log, save_images
import time
import random
from PIL import Image
import PIL
class Model():
def __init__(self):
self.context = sdkit.Context()
self.context.model_paths["stable-diffusion"] = "Deliberate_v3.safetensors" //(or any other model, i recommend Deliberate 2 or 6, May 2024)
self.context.model_paths["lora"] = "delib_6_8_f_m.safetensors"
load_model(self.context, "stable-diffusion")
load_model(self.context, "lora")
def generate_image(self, prompt, guidance_scale, seed, width, height, lora_alpha):
images = generate_images(self.context, prompt=prompt, guidance_scale=guidance_scale, sampler_name="dpmpp_2m", seed=seed, width=width, height=height, lora_alpha=lora_alpha)
name = "image"+str(time.strftime('%X')).replace(':','-')+".png"
path = "./static/nn/" + name
im1 = images[0].save(path)
return path
...
prompt = ...
etc
...
im = self.model.generate_image(prompt, seed, width, height, lora_alpha)
m = Model
prompt needs a race name, eg "dwarf female red hair" 2 > guidance_scale > 7 seed any 512 >= width >= 756 0.3 >= lora_alpha >= 0.7