Return to AutoPipelineForText2Image
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import gradio as gr
|
|
| 3 |
import numpy as np
|
| 4 |
import random
|
| 5 |
import os
|
| 6 |
-
from diffusers import
|
| 7 |
import torch
|
| 8 |
from huggingface_hub import snapshot_download
|
| 9 |
|
|
@@ -12,7 +12,7 @@ SPACE_PASSWORD = 'KR_4dmin'
|
|
| 12 |
|
| 13 |
snapshot_download(repo_id="Roomie/xavyy", cache_dir='./')
|
| 14 |
|
| 15 |
-
pipeline =
|
| 16 |
'black-forest-labs/FLUX.1-schnell', torch_dtype=torch.bfloat16).to('cuda')
|
| 17 |
pipeline.load_lora_weights('Roomie/xavyy', weight_name='xavyy.safetensors')
|
| 18 |
|
|
@@ -32,7 +32,7 @@ def infer(prompt, refer_image, height, width):
|
|
| 32 |
# num_inference_steps=num_inference_steps,
|
| 33 |
width=width,
|
| 34 |
height=height,
|
| 35 |
-
image=refer_image
|
| 36 |
# generator=generator
|
| 37 |
).images[0]
|
| 38 |
|
|
|
|
| 3 |
import numpy as np
|
| 4 |
import random
|
| 5 |
import os
|
| 6 |
+
from diffusers import AutoPipelineForText2Image
|
| 7 |
import torch
|
| 8 |
from huggingface_hub import snapshot_download
|
| 9 |
|
|
|
|
| 12 |
|
| 13 |
snapshot_download(repo_id="Roomie/xavyy", cache_dir='./')
|
| 14 |
|
| 15 |
+
pipeline = AutoPipelineForText2Image.from_pretrained(
|
| 16 |
'black-forest-labs/FLUX.1-schnell', torch_dtype=torch.bfloat16).to('cuda')
|
| 17 |
pipeline.load_lora_weights('Roomie/xavyy', weight_name='xavyy.safetensors')
|
| 18 |
|
|
|
|
| 32 |
# num_inference_steps=num_inference_steps,
|
| 33 |
width=width,
|
| 34 |
height=height,
|
| 35 |
+
# image=refer_image
|
| 36 |
# generator=generator
|
| 37 |
).images[0]
|
| 38 |
|