jackyhate/text-to-image-2M
Viewer • Updated • 649k • 6.3k • 162
How to use Felguk/Jamgen-v0.5 with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("Felguk/Jamgen-v0.5", dtype=torch.bfloat16, device_map="cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]Jamgen is a state-of-the-art text-to-image generation model built using diffusion models. With Jamgen, you can generate high-quality images directly from textual descriptions. This model leverages the power of deep learning and diffusion techniques to create stunning visuals that match your input text.
To get started with Jamgen, you need to have Python installed on your system. We recommend using a virtual environment to manage dependencies.
You can install the required dependencies by running:
pip install torch transformers diffusers pillow
You can download this model using diffusion libary:
pip install diffusers
Next, download the model:
from diffusers import StableDiffusionPipeline
# Replace 'your-model-id' with the actual model ID on Hugging Face
model_id = "your-model-id"
pipeline = StableDiffusionPipeline.from_pretrained(model_id)
from diffusers import StableDiffusionPipeline
import torch
# Load the model
model_id = "your-model-id"
pipeline = StableDiffusionPipeline.from_pretrained(model_id)
pipeline.to("cuda") # Use GPU if available
# Generate an image from text
prompt = "A beautiful sunset over the mountains"
image = pipeline(prompt).images[0]
# Save the generated image
image.save("generated_image.png")
Base model
black-forest-labs/FLUX.1-dev