Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
luigi12345Β 
posted an update about 10 hours ago
Post
181
πŸ€”Create Beautiful Diagrams with FLUX WITHOUT DISTORTED TEXT✌️

from huggingface_hub import InferenceClient
client = InferenceClient("black-forest-labs/FLUX.1-schnell", token="hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

https://huggingface.co/spaces/black-forest-labs/FLUX.1-schnell
# output is a PIL.Image object
image = client.text_to_image("A handrawn colorful mind map diagram, rugosity drawn  lines, clear shapes, brain silhouette, text areas. must include the texts LITERACY/MENTAL β”œβ”€β”€ PEACE [Dove Icon] β”œβ”€β”€ HEALTH [Vitruvian Man ~60px] β”œβ”€β”€ CONNECT [Brain-Mind Connection Icon] β”œβ”€β”€ INTELLIGENCE β”‚   └── EVERYTHING [Globe Icon ~50px] └── MEMORY     β”œβ”€β”€ READING [Book Icon ~40px]     β”œβ”€β”€ SPEED [Speedometer Icon]     └── CREATIVITY         └── INTELLIGENCE [Lightbulb + Infinity ~30px]")

from gradio_client import Client, file

client = Client("black-forest-labs/FLUX.1-schnell")

client.predict(
prompt="A handrawn colorful mind map diagram, rugosity drawn lines, clear shapes, brain silhouette, text areas. must include the texts LITERACY/MENTAL β”œβ”€β”€ PEACE [Dove Icon] β”œβ”€β”€ HEALTH [Vitruvian Man ~60px] β”œβ”€β”€ CONNECT [Brain-Mind Connection Icon] β”œβ”€β”€ INTELLIGENCE β”‚ └── EVERYTHING [Globe Icon ~50px] └── MEMORY β”œβ”€β”€ READING [Book Icon ~40px] β”œβ”€β”€ SPEED [Speedometer Icon] └── CREATIVITY └── INTELLIGENCE [Lightbulb + Infinity ~30px]",
seed=1872187377,
randomize_seed=True,
width=1024,
height=1024,
num_inference_steps=4,
api_name="/infer"
)

In this post