|
--- |
|
widget: |
|
- text: ksrksr a man is standing facing forward |
|
output: |
|
url: images/ksrksr_e000033_00_20241012044531.png |
|
base_model: enhanceaiteam/FLUX.1-Pro |
|
instance_prompt: ksrksr |
|
license: mit |
|
pipeline_tag: text-to-image |
|
--- |
|
import requests |
|
|
|
API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev" |
|
headers = {"Authorization": "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"} |
|
|
|
def query(payload): |
|
response = requests.post(API_URL, headers=headers, json=payload) |
|
return response.content |
|
image_bytes = query({ |
|
"inputs": "Astronaut riding a horse", |
|
}) |
|
# You can access the image with PIL.Image for example |
|
import io |
|
from PIL import Image |
|
image = Image.open(io.BytesIO(image_bytes)) |
|
|
|
|
|
|
|
--- |
|
tags: |
|
- text-to-image |
|
- FLUX.1-PRO |
|
- generation |
|
widget: |
|
- text: ksrksr a man is standing facing forward |
|
output: |
|
url: images/ksrksr_e000033_00_20241012044531.png |
|
base_model: enhanceaiteam/FLUX.1-Pro |
|
instance_prompt: ksrksr |
|
license: mit |
|
--- |
|
# ksr |
|
|
|
<Gallery /> |
|
|
|
|
|
## Trigger words |
|
|
|
You should use `ksrksr` to trigger the image generation. |
|
|
|
|
|
## Download model |
|
|
|
Weights for this model are available in Safetensors format. |
|
|
|
[Download](/defhouse/ksrksr/tree/main) them in the Files & versions tab. |