Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
5ba7022
1
Parent(s):
9cb3d0f
Update Flux pipeline initialization to load on CPU and reflect device in log
Browse files
app.py
CHANGED
@@ -20,9 +20,9 @@ from diffusers import FluxPipeline
|
|
20 |
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(
|
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 |
|
|
|
20 |
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("cpu")
|
24 |
+
print(f"Flux pipeline loaded on {pipe.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 |
|