Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -75,17 +75,17 @@ torch._inductor.config.epilogue_fusion = False
|
|
75 |
torch._inductor.config.coordinate_descent_check_all_directions = True
|
76 |
|
77 |
# Ensure model and scheduler are initialized in GPU-enabled function
|
78 |
-
if torch.cuda.is_available():
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
|
90 |
pipe.set_progress_bar_config(disable=True)
|
91 |
|
|
|
75 |
torch._inductor.config.coordinate_descent_check_all_directions = True
|
76 |
|
77 |
# Ensure model and scheduler are initialized in GPU-enabled function
|
78 |
+
#if torch.cuda.is_available():
|
79 |
+
pipe = StableDiffusion3Pipeline.from_pretrained(
|
80 |
+
repo,
|
81 |
+
tokenizer_3=tokenizer_3,
|
82 |
+
text_encoder_3=text_encoder_3,
|
83 |
+
torch_dtype=torch.float16).to("cuda")
|
84 |
+
pipe2 = StableDiffusion3Img2ImgPipeline.from_pretrained(
|
85 |
+
repo,
|
86 |
+
tokenizer_3=tokenizer_3,
|
87 |
+
text_encoder_3=text_encoder_3,
|
88 |
+
torch_dtype=torch.float16).to("cuda")
|
89 |
|
90 |
pipe.set_progress_bar_config(disable=True)
|
91 |
|