ovi054 commited on
Commit
2cefbad
·
verified ·
1 Parent(s): ed65bd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -37,12 +37,12 @@ t2i_transformer = LongCatImageTransformer2DModel.from_pretrained(
37
  use_safetensors=True
38
  ).to(device)
39
 
40
- t2i_pipe = LongCatImagePipeline.from_pretrained(
41
  t2i_model_id,
42
  transformer=t2i_transformer,
43
  text_processor=t2i_text_processor,
44
  )
45
- t2i_pipe.to(device, torch.bfloat16)
46
 
47
  print(f"✅ Text-to-Image model loaded successfully")
48
 
@@ -120,7 +120,7 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidan
120
  load_lora_auto(pipe, lora_id)
121
 
122
  try:
123
- image = t2i_pipe(
124
  prompt=prompt,
125
  negative_prompt="",
126
  width=width,
 
37
  use_safetensors=True
38
  ).to(device)
39
 
40
+ pipe = LongCatImagePipeline.from_pretrained(
41
  t2i_model_id,
42
  transformer=t2i_transformer,
43
  text_processor=t2i_text_processor,
44
  )
45
+ pipe.to(device, torch.bfloat16)
46
 
47
  print(f"✅ Text-to-Image model loaded successfully")
48
 
 
120
  load_lora_auto(pipe, lora_id)
121
 
122
  try:
123
+ image = pipe(
124
  prompt=prompt,
125
  negative_prompt="",
126
  width=width,