Spaces:
Running
on
Zero
Running
on
Zero
alfredplpl
commited on
Commit
•
f0aff57
1
Parent(s):
057f3fb
Update app.py
Browse files
app.py
CHANGED
@@ -15,21 +15,22 @@ from safetensors.torch import load_file
|
|
15 |
|
16 |
model_id = 'alfredplpl/emix-0-4-turbo'
|
17 |
auth_token=os.environ["ACCESS_TOKEN"]
|
18 |
-
adapter_id = "latent-consistency/lcm-lora-sdxl"
|
19 |
-
adapter_id_2 = "manual.safetensors"
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
33 |
|
34 |
pipe=pipe.to("cuda")
|
35 |
#pipe.load_lora_weights(adapter_id)
|
|
|
15 |
|
16 |
model_id = 'alfredplpl/emix-0-4-turbo'
|
17 |
auth_token=os.environ["ACCESS_TOKEN"]
|
18 |
+
#adapter_id = "latent-consistency/lcm-lora-sdxl"
|
19 |
+
#adapter_id_2 = "manual.safetensors"
|
20 |
+
|
21 |
+
scheduler=EulerAncestralDiscreteScheduler(model_id, subfolder="scheduler",use_auth_token=auth_token)
|
22 |
+
|
23 |
+
pipe = StableDiffusionXLPipeline.from_pretrained(
|
24 |
+
model_id,
|
25 |
+
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
26 |
+
use_auth_token=auth_token)
|
27 |
+
|
28 |
+
#pipe = AutoPipelineForText2Image.from_pretrained(
|
29 |
+
# model_id,
|
30 |
+
# torch_dtype=torch.float16,
|
31 |
+
# use_auth_token=auth_token
|
32 |
+
#)
|
33 |
+
#pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
34 |
|
35 |
pipe=pipe.to("cuda")
|
36 |
#pipe.load_lora_weights(adapter_id)
|