Spaces:
Running
on
A100
Running
on
A100
Python style for diffusers code block
#85
by
Wauplin
HF staff
- opened
app.py
CHANGED
@@ -76,6 +76,7 @@ def update_selection(selected_state: gr.SelectData, sdxl_loras):
|
|
76 |
'''
|
77 |
if is_compatible:
|
78 |
use_with_diffusers += f'''
|
|
|
79 |
from diffusers import StableDiffusionXLPipeline
|
80 |
import torch
|
81 |
|
@@ -88,6 +89,7 @@ def update_selection(selected_state: gr.SelectData, sdxl_loras):
|
|
88 |
lora_scale= 0.9
|
89 |
image = pipe(prompt, num_inference_steps=30, guidance_scale=7.5, cross_attention_kwargs={{"scale": lora_scale}}).images[0]
|
90 |
image.save("image.png")
|
|
|
91 |
'''
|
92 |
elif not is_pivotal:
|
93 |
use_with_diffusers += "This LoRA is not compatible with diffusers natively yet. But you can still use it on diffusers with `bmaltais/kohya_ss` LoRA class, check out this [Google Colab](https://colab.research.google.com/drive/14aEJsKdEQ9_kyfsiV6JDok799kxPul0j )"
|
|
|
76 |
'''
|
77 |
if is_compatible:
|
78 |
use_with_diffusers += f'''
|
79 |
+
```py
|
80 |
from diffusers import StableDiffusionXLPipeline
|
81 |
import torch
|
82 |
|
|
|
89 |
lora_scale= 0.9
|
90 |
image = pipe(prompt, num_inference_steps=30, guidance_scale=7.5, cross_attention_kwargs={{"scale": lora_scale}}).images[0]
|
91 |
image.save("image.png")
|
92 |
+
```
|
93 |
'''
|
94 |
elif not is_pivotal:
|
95 |
use_with_diffusers += "This LoRA is not compatible with diffusers natively yet. But you can still use it on diffusers with `bmaltais/kohya_ss` LoRA class, check out this [Google Colab](https://colab.research.google.com/drive/14aEJsKdEQ9_kyfsiV6JDok799kxPul0j )"
|