Run this model with HF Jobs
Run sarathAI/NFT-Genesis on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/sarathAI/NFT-Genesis. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/sarathAI/NFT-Genesis on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use sarathAI/NFT-Genesis with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use sarathAI/NFT-Genesis with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("sarathAI/NFT-Genesis", dtype=torch.bfloat16, device_map="cuda") prompt = "Monkey smoking a cigarette" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files38 unmodified lines394041424342434445464748495051525354555657585960616263646566676869707172734546474874757638 unmodified lines
## UsageTo generate an image:```pythonfrom model import NFTGenesisModel```import requestsimport iofrom 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 bytesif 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 imagetry: 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.")
model = NFTGenesisModel()description = "Your textual description here"image = model.generate(description)image.save("output.jpg")```
## ConfigurationREADME.md+31-6