Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
9cb3d0f
1
Parent(s):
9c118d6
Add logging for Flux pipeline device initialization in app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,8 @@ llm_client = Client("Qwen/Qwen2.5-72B-Instruct")
|
|
21 |
|
22 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
23 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
|
24 |
-
|
|
|
25 |
def generate_t2i_prompt(item_name):
|
26 |
llm_prompt_template = """You are tasked with creating a concise yet highly detailed description of an item to be used for generating an image in a game development pipeline. The image should show the **entire item** with no parts cropped or hidden. The background should always be plain and monocolor, with no focus on it.
|
27 |
|
|
|
21 |
|
22 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
23 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
|
24 |
+
print(f"Flux pipeline loaded on {device}")
|
25 |
+
|
26 |
def generate_t2i_prompt(item_name):
|
27 |
llm_prompt_template = """You are tasked with creating a concise yet highly detailed description of an item to be used for generating an image in a game development pipeline. The image should show the **entire item** with no parts cropped or hidden. The background should always be plain and monocolor, with no focus on it.
|
28 |
|