Downloads · 30 days
4
1% of all-time downloads
sarathAI/NFT-Genesis
NFT-Genesis is a text-to-image model from sarathAI. Use it when you need an image from a text prompt. It is set up for diffusers.
This project involves a text-to-image model fine-tuned on the Stable Diffusion 1.0XL architecture, specifically tailored for the NFT-Genesis project. The model is designed to generate high-quality, unique images based…
Downloads · 30 days
4
1% of all-time downloads
All-time downloads
644
Public
Repo size
23.4 MB
Likes
2
Public
Click a slice to open those files.
.safetensors23.4 MB · 100%
From the Hugging Face model README
This project involves a text-to-image model fine-tuned on the Stable Diffusion 1.0XL architecture, specifically tailored for the NFT-Genesis project. The model is designed to generate high-quality, unique images based on textual descriptions, making it especially suited for creating digital art and Non-Fungible Tokens (NFTs).
requirements.txtgit clone [repository URL]
cd [repository name]
pip install -r requirements.txt
To generate an image:
import io
from PIL import Image
API_URL = "https://api-inference.huggingface.co/models/sarathAI/NFT-Genesis"
headers = {"Authorization": "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.content
image_bytes = query({
"inputs": "Formula 1 car",
})
# Added: Check if the response is indeed image bytes
if image_bytes.startswith(b'\xff\xd8'): # JPEG
print("JPEG image detected")
elif image_bytes.startswith(b'\x89PNG\r\n\x1a\n'): # PNG
print("PNG image detected")
else:
print("The response might not be an image or is in an unrecognized format.")
# Attempt to open the image
try:
image = Image.open(io.BytesIO(image_bytes))
image.save("output_image.jpg")
print("Image saved as output_image.jpg. Please open this file to view the image.")
except IOError:
print("Cannot open the image. The file might be corrupted or in an unsupported format.")
config.py file to tweak performance and output quality.dataset/README.md.Contributions to the project are welcome. Please follow the guidelines in CONTRIBUTING.md for submitting pull requests or reporting issues.
This project is licensed under [specify license type], as found in the LICENSE file.
This model is intended for creative and artistic purposes. Users are responsible for the ethical use of the technology and ensuring that generated content respects copyright and other legal considerations.