Instructions to use 0xJustin/Dungeons-and-Diffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use 0xJustin/Dungeons-and-Diffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("0xJustin/Dungeons-and-Diffusion", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Inference doesn't seem to load the model.
Hello. I preface by saying that I'm new to it, so I might be doing something wrong myself.
I've been trying to load the model with Inference
https://api-inference.huggingface.co/models/0xJustin/Dungeons-and-Diffusion
but it seems like it always returns the same error:
"error":"Model 0xJustin/Dungeons-and-Diffusion is currently loading","estimated_time":20.0
I am aware that the model has to load first, but no matter how much time I wait the estimated time stays at 20.
The code I'm using is really simple, just giving a text input and expecting an output.
def generate_image(prompt):
data = json.dumps({"inputs": prompt})
response = requests.post(API_URL, headers=headers, data=data)
if response.status_code == 200:
return response.content
else:
raise Exception(f"Failed to generate image: {response.text}")
Do I need to specify other parameters, is there something else I'm missing?
Thanks,
Gio