alfredplpl commited on
Commit
f0aff57
1 Parent(s): 057f3fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -15
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
- #scheduler=DPMSolverMultistepScheduler()
21
-
22
- #pipe = StableDiffusionXLPipeline.from_pretrained(
23
- # model_id,
24
- # torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
25
- # use_auth_token=auth_token)
26
-
27
- pipe = AutoPipelineForText2Image.from_pretrained(
28
- model_id,
29
- torch_dtype=torch.float16,
30
- use_auth_token=auth_token
31
- )
32
- pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
 
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)