Merunes commited on
Commit
69b75bc
·
verified ·
1 Parent(s): a3f3340

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -14,9 +14,6 @@ if torch.cuda.is_available():
14
  else:
15
  torch_dtype = torch.float32
16
 
17
- pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
18
- pipe = pipe.to(device)
19
-
20
  MAX_SEED = np.iinfo(np.int32).max
21
  MAX_IMAGE_SIZE = 1024
22
 
@@ -39,8 +36,10 @@ def infer(
39
 
40
  generator = torch.Generator().manual_seed(seed)
41
 
 
 
 
42
  image = pipe(
43
- model_id = model_id,
44
  prompt=prompt,
45
  negative_prompt=negative_prompt,
46
  guidance_scale=guidance_scale,
 
14
  else:
15
  torch_dtype = torch.float32
16
 
 
 
 
17
  MAX_SEED = np.iinfo(np.int32).max
18
  MAX_IMAGE_SIZE = 1024
19
 
 
36
 
37
  generator = torch.Generator().manual_seed(seed)
38
 
39
+ pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
40
+ pipe = pipe.to(device)
41
+
42
  image = pipe(
 
43
  prompt=prompt,
44
  negative_prompt=negative_prompt,
45
  guidance_scale=guidance_scale,