Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
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 =
|
187 |
-
guidance_scale =
|
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 #
|