seawolf2357 commited on
Commit
e6b5c32
โ€ข
1 Parent(s): e6905b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -26,10 +26,11 @@ model_path = snapshot_download(
26
 
27
  # ๋ชจ๋ธ ๋กœ๋“œ ํ•จ์ˆ˜
28
  def load_pipeline(pipeline_type):
 
29
  if pipeline_type == "text2img":
30
- return StableDiffusion3Pipeline.from_pretrained(model_path, torch_dtype=torch.float16)
31
  elif pipeline_type == "img2img":
32
- return StableDiffusion3Img2ImgPipeline.from_pretrained(model_path, torch_dtype=torch.float16)
33
 
34
  # ๋””๋ฐ”์ด์Šค ์„ค์ •
35
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
 
26
 
27
  # ๋ชจ๋ธ ๋กœ๋“œ ํ•จ์ˆ˜
28
  def load_pipeline(pipeline_type):
29
+ logging.debug(f'Loading pipeline: {pipeline_type}')
30
  if pipeline_type == "text2img":
31
+ return StableDiffusion3Pipeline.from_pretrained(model_path, torch_dtype=torch.float16, use_fast=True)
32
  elif pipeline_type == "img2img":
33
+ return StableDiffusion3Img2ImgPipeline.from_pretrained(model_path, torch_dtype=torch.float16, use_fast=True)
34
 
35
  # ๋””๋ฐ”์ด์Šค ์„ค์ •
36
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")