mohansathya commited on
Commit
b07bd25
·
1 Parent(s): 9f8bbb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,7 +13,7 @@ from gradio.components import Textbox, Image
13
 
14
 
15
  repo_name = 'mohansathya/twosd' # YOUR REPO NAME
16
- pipe2 = StableDiffusionPipeline.from_pretrained(repo_name, torch_dtype=torch.float16)
17
 
18
 
19
 
@@ -27,7 +27,7 @@ def generate_query_response(prompt):
27
 
28
  seed = random.randint(0, 2147483647)
29
  print("Seed: {}".format(str(seed)))
30
- generator = torch.Generator().manual_seed(seed)
31
 
32
  with autocast("cpu"), torch.inference_mode():
33
  imgs = pipe2(
 
13
 
14
 
15
  repo_name = 'mohansathya/twosd' # YOUR REPO NAME
16
+ pipe2 = StableDiffusionPipeline.from_pretrained(repo_name, torch_dtype=torch.float16).to('cpu')
17
 
18
 
19
 
 
27
 
28
  seed = random.randint(0, 2147483647)
29
  print("Seed: {}".format(str(seed)))
30
+ generator = torch.Generator(device='cpu').manual_seed(seed)
31
 
32
  with autocast("cpu"), torch.inference_mode():
33
  imgs = pipe2(