fixed bug arguments
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from huggingface_hub import snapshot_download
|
|
| 10 |
snapshot_download(repo_id="Roomie/xavyy", cache_dir='./')
|
| 11 |
|
| 12 |
pipeline = AutoPipelineForText2Image.from_pretrained(
|
| 13 |
-
'black-forest-labs/FLUX.1-schnell', torch_dtype=torch.bfloat16).to('
|
| 14 |
pipeline.load_lora_weights('Roomie/xavyy', weight_name='xavyy.safetensors')
|
| 15 |
|
| 16 |
|
|
@@ -20,12 +20,7 @@ MAX_IMAGE_SIZE = 1024
|
|
| 20 |
# @spaces.GPU #[uncomment to use ZeroGPU]
|
| 21 |
|
| 22 |
|
| 23 |
-
def infer(prompt
|
| 24 |
-
|
| 25 |
-
if randomize_seed:
|
| 26 |
-
seed = random.randint(0, MAX_SEED)
|
| 27 |
-
|
| 28 |
-
generator = torch.Generator().manual_seed(seed)
|
| 29 |
|
| 30 |
image = pipeline(
|
| 31 |
prompt=prompt,
|
|
@@ -37,7 +32,7 @@ def infer(prompt, seed, randomize_seed):
|
|
| 37 |
# generator=generator
|
| 38 |
).images[0]
|
| 39 |
|
| 40 |
-
return image
|
| 41 |
|
| 42 |
|
| 43 |
examples = [
|
|
|
|
| 10 |
snapshot_download(repo_id="Roomie/xavyy", cache_dir='./')
|
| 11 |
|
| 12 |
pipeline = AutoPipelineForText2Image.from_pretrained(
|
| 13 |
+
'black-forest-labs/FLUX.1-schnell', torch_dtype=torch.bfloat16).to('cuda')
|
| 14 |
pipeline.load_lora_weights('Roomie/xavyy', weight_name='xavyy.safetensors')
|
| 15 |
|
| 16 |
|
|
|
|
| 20 |
# @spaces.GPU #[uncomment to use ZeroGPU]
|
| 21 |
|
| 22 |
|
| 23 |
+
def infer(prompt):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
image = pipeline(
|
| 26 |
prompt=prompt,
|
|
|
|
| 32 |
# generator=generator
|
| 33 |
).images[0]
|
| 34 |
|
| 35 |
+
return image
|
| 36 |
|
| 37 |
|
| 38 |
examples = [
|