Spaces:
Runtime error
Runtime error
seawolf2357
commited on
Commit
โข
e6b5c32
1
Parent(s):
e6905b6
Update app.py
Browse files
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")
|