Spaces:
Running
on
Zero
Running
on
Zero
ehristoforu
commited on
Commit
•
e8a5fba
1
Parent(s):
88a08d8
Update app.py
Browse files
app.py
CHANGED
@@ -35,8 +35,6 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
35 |
USE_TORCH_COMPILE = 0
|
36 |
ENABLE_CPU_OFFLOAD = 0
|
37 |
|
38 |
-
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
39 |
-
|
40 |
|
41 |
if torch.cuda.is_available():
|
42 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
@@ -45,10 +43,12 @@ if torch.cuda.is_available():
|
|
45 |
use_safetensors=True,
|
46 |
)
|
47 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
48 |
-
|
49 |
|
50 |
pipe.load_lora_weights("ehristoforu/dalle-3-xl-v2", weight_name="dalle-3-xl-lora-v2.safetensors", adapter_name="dalle")
|
51 |
pipe.set_adapters("dalle")
|
|
|
|
|
52 |
|
53 |
|
54 |
|
|
|
35 |
USE_TORCH_COMPILE = 0
|
36 |
ENABLE_CPU_OFFLOAD = 0
|
37 |
|
|
|
|
|
38 |
|
39 |
if torch.cuda.is_available():
|
40 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
|
|
43 |
use_safetensors=True,
|
44 |
)
|
45 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
46 |
+
|
47 |
|
48 |
pipe.load_lora_weights("ehristoforu/dalle-3-xl-v2", weight_name="dalle-3-xl-lora-v2.safetensors", adapter_name="dalle")
|
49 |
pipe.set_adapters("dalle")
|
50 |
+
|
51 |
+
pipe.to("cuda")
|
52 |
|
53 |
|
54 |
|