clementchadebec commited on
Commit
3d6573d
1 Parent(s): 07e64a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -12,10 +12,9 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
12
  IS_SPACE = os.environ.get("SPACE_ID", None) is not None
13
 
14
  transformer = SD3Transformer2DModel.from_pretrained(
15
- "stabilityai/stable-diffusion-3-medium",
16
  subfolder="transformer",
17
  torch_dtype=torch.float16,
18
- revision="refs/pr/26"
19
  )
20
  transformer = PeftModel.from_pretrained(transformer, "jasperai/flash-sd3")
21
 
@@ -23,8 +22,7 @@ transformer = PeftModel.from_pretrained(transformer, "jasperai/flash-sd3")
23
  if torch.cuda.is_available():
24
  torch.cuda.max_memory_allocated(device=device)
25
  pipe = StableDiffusion3Pipeline.from_pretrained(
26
- "stabilityai/stable-diffusion-3-medium",
27
- revision="refs/pr/26",
28
  transformer=transformer,
29
  torch_dtype=torch.float16,
30
  text_encoder_3=None,
@@ -34,8 +32,7 @@ if torch.cuda.is_available():
34
  pipe = pipe.to(device)
35
  else:
36
  pipe = StableDiffusion3Pipeline.from_pretrained(
37
- "stabilityai/stable-diffusion-3-medium",
38
- revision="refs/pr/26",
39
  transformer=transformer,
40
  torch_dtype=torch.float16,
41
  text_encoder_3=None,
@@ -45,9 +42,8 @@ else:
45
 
46
 
47
  pipe.scheduler = FlashFlowMatchEulerDiscreteScheduler.from_pretrained(
48
- "stabilityai/stable-diffusion-3-medium",
49
  subfolder="scheduler",
50
- revision="refs/pr/26",
51
  )
52
 
53
  MAX_SEED = np.iinfo(np.int32).max
 
12
  IS_SPACE = os.environ.get("SPACE_ID", None) is not None
13
 
14
  transformer = SD3Transformer2DModel.from_pretrained(
15
+ "stabilityai/stable-diffusion-3-medium-diffusers",
16
  subfolder="transformer",
17
  torch_dtype=torch.float16,
 
18
  )
19
  transformer = PeftModel.from_pretrained(transformer, "jasperai/flash-sd3")
20
 
 
22
  if torch.cuda.is_available():
23
  torch.cuda.max_memory_allocated(device=device)
24
  pipe = StableDiffusion3Pipeline.from_pretrained(
25
+ "stabilityai/stable-diffusion-3-medium-diffusers",
 
26
  transformer=transformer,
27
  torch_dtype=torch.float16,
28
  text_encoder_3=None,
 
32
  pipe = pipe.to(device)
33
  else:
34
  pipe = StableDiffusion3Pipeline.from_pretrained(
35
+ "stabilityai/stable-diffusion-3-medium-diffusers",
 
36
  transformer=transformer,
37
  torch_dtype=torch.float16,
38
  text_encoder_3=None,
 
42
 
43
 
44
  pipe.scheduler = FlashFlowMatchEulerDiscreteScheduler.from_pretrained(
45
+ "stabilityai/stable-diffusion-3-medium-diffusers",
46
  subfolder="scheduler",
 
47
  )
48
 
49
  MAX_SEED = np.iinfo(np.int32).max