Shivdutta commited on
Commit
1392cf8
·
verified ·
1 Parent(s): 24936d2

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -175,7 +175,7 @@ def contrast_loss(images):
175
  variance = torch.var(images)
176
  return -variance
177
 
178
- def generate_with_prompt_style_guidance(prompt, style, seed):
179
 
180
  prompt = prompt + ' in style of s'
181
 
@@ -183,8 +183,8 @@ def generate_with_prompt_style_guidance(prompt, style, seed):
183
 
184
  height = 512 # default height of Stable Diffusion
185
  width = 512 # default width of Stable Diffusion
186
- num_inference_steps = 10 # # Number of denoising steps
187
- guidance_scale = 8 # # Scale for classifier-free guidance
188
  generator = torch.manual_seed(seed) # Seed generator to create the inital latent noise
189
  batch_size = 1
190
  contrast_loss_scale = 200 #
 
175
  variance = torch.var(images)
176
  return -variance
177
 
178
+ def generate_with_prompt_style_guidance(prompt, style, seed,num_inference_steps,guidance_scale):
179
 
180
  prompt = prompt + ' in style of s'
181
 
 
183
 
184
  height = 512 # default height of Stable Diffusion
185
  width = 512 # default width of Stable Diffusion
186
+ num_inference_steps = num_inference_steps # # Number of denoising steps
187
+ guidance_scale = guidance_scale # # Scale for classifier-free guidance
188
  generator = torch.manual_seed(seed) # Seed generator to create the inital latent noise
189
  batch_size = 1
190
  contrast_loss_scale = 200 #