saranbalan commited on
Commit
34ba4a8
·
verified ·
1 Parent(s): ab4208d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,11 +17,11 @@ client = Groq(api_key=api_key)
17
 
18
  # Set device: CUDA if available, else CPU
19
  # device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
20
- torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
21
 
22
 
23
  model_id1 = os.getenv("API_KEY")
24
- pipe = StableDiffusionPipeline.from_pretrained(model_id1, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True)
25
  pipe = pipe.to('cpu')
26
 
27
  # Updated function for text generation using the new API structure
 
17
 
18
  # Set device: CUDA if available, else CPU
19
  # device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
20
+ # torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
21
 
22
 
23
  model_id1 = os.getenv("API_KEY")
24
+ pipe = StableDiffusionPipeline.from_pretrained(model_id1, low_cpu_mem_usage=True, use_safetensors=True)
25
  pipe = pipe.to('cpu')
26
 
27
  # Updated function for text generation using the new API structure