Spaces:
Running
Running
Commit
•
4f76251
1
Parent(s):
1d06c07
Update app.py
Browse files
app.py
CHANGED
@@ -185,13 +185,12 @@ Weights for this model are available in Safetensors format.
|
|
185 |
from diffusers import AutoPipelineForText2Image
|
186 |
import torch
|
187 |
|
188 |
-
pipeline = AutoPipelineForText2Image.from_pretrained('{info["baseModel"]}', torch_dtype=torch.float16).to(
|
189 |
pipeline.load_lora_weights("{{user_repo_id}, weight_name='{downloaded_files["weightName"]}')
|
190 |
image = pipeline('{prompt if prompt else (formatted_words if formatted_words else 'Your custom prompt')}').images[0]
|
191 |
```
|
192 |
|
193 |
For more details, including weighting, merging and fusing LoRAs, check the [documentation on loading LoRAs in diffusers](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters)
|
194 |
-
|
195 |
"""
|
196 |
#for index, (image, prompt) in enumerate(zip(downloaded_files["imageName"], downloaded_files["imagePrompt"])):
|
197 |
# if index == 1:
|
|
|
185 |
from diffusers import AutoPipelineForText2Image
|
186 |
import torch
|
187 |
|
188 |
+
pipeline = AutoPipelineForText2Image.from_pretrained('{info["baseModel"]}', torch_dtype=torch.float16).to('cuda')
|
189 |
pipeline.load_lora_weights("{{user_repo_id}, weight_name='{downloaded_files["weightName"]}')
|
190 |
image = pipeline('{prompt if prompt else (formatted_words if formatted_words else 'Your custom prompt')}').images[0]
|
191 |
```
|
192 |
|
193 |
For more details, including weighting, merging and fusing LoRAs, check the [documentation on loading LoRAs in diffusers](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters)
|
|
|
194 |
"""
|
195 |
#for index, (image, prompt) in enumerate(zip(downloaded_files["imageName"], downloaded_files["imagePrompt"])):
|
196 |
# if index == 1:
|