Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -376,6 +376,7 @@ def blue_loss_variant(images, use_mean=False, alpha=1.0):
|
|
| 376 |
|
| 377 |
return loss
|
| 378 |
|
|
|
|
| 379 |
def generate_with_prompt_style_guidance(prompt, style, seed,num_inference_steps,guidance_scale,loss_function):
|
| 380 |
|
| 381 |
prompt = prompt + ' in style of s'
|
|
@@ -386,7 +387,7 @@ def generate_with_prompt_style_guidance(prompt, style, seed,num_inference_steps,
|
|
| 386 |
width = 512 # default width of Stable Diffusion
|
| 387 |
num_inference_steps = num_inference_steps # # Number of denoising steps
|
| 388 |
guidance_scale = guidance_scale # # Scale for classifier-free guidance
|
| 389 |
-
generator = torch.manual_seed(seed) # Seed generator to create the
|
| 390 |
batch_size = 1
|
| 391 |
|
| 392 |
|
|
|
|
| 376 |
|
| 377 |
return loss
|
| 378 |
|
| 379 |
+
@spaces.GPU
|
| 380 |
def generate_with_prompt_style_guidance(prompt, style, seed,num_inference_steps,guidance_scale,loss_function):
|
| 381 |
|
| 382 |
prompt = prompt + ' in style of s'
|
|
|
|
| 387 |
width = 512 # default width of Stable Diffusion
|
| 388 |
num_inference_steps = num_inference_steps # # Number of denoising steps
|
| 389 |
guidance_scale = guidance_scale # # Scale for classifier-free guidance
|
| 390 |
+
generator = torch.manual_seed(seed) # Seed generator to create the initial latent noise
|
| 391 |
batch_size = 1
|
| 392 |
|
| 393 |
|