Spaces:
Running
Running
OmPrakashSingh1704
commited on
Commit
·
10a04a8
1
Parent(s):
f963ba1
options/Banner_Model/Text2Banner.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
from huggingface_hub import InferenceClient
|
2 |
-
|
3 |
-
|
4 |
def T2I(prompt, width=1024, height=1024, guidance_scale=3.5, num_inference_steps=28):
|
5 |
# Initialize the model client
|
6 |
-
model = InferenceClient(model="black-forest-labs/FLUX.1-dev")
|
7 |
|
8 |
# Prepare the request parameters
|
9 |
payload = {
|
|
|
1 |
from huggingface_hub import InferenceClient
|
2 |
+
import torch
|
3 |
+
device="cuda" torch.cuda.is_available() else "cpu"
|
4 |
def T2I(prompt, width=1024, height=1024, guidance_scale=3.5, num_inference_steps=28):
|
5 |
# Initialize the model client
|
6 |
+
model = InferenceClient(model="black-forest-labs/FLUX.1-dev").to(device)
|
7 |
|
8 |
# Prepare the request parameters
|
9 |
payload = {
|
options/Banner_Model/__pycache__/Image2Image.cpython-310.pyc
CHANGED
Binary files a/options/Banner_Model/__pycache__/Image2Image.cpython-310.pyc and b/options/Banner_Model/__pycache__/Image2Image.cpython-310.pyc differ
|
|