Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
0af12f1f
Unverified
Commit
0af12f1f
authored
Dec 26, 2023
by
Will Berman
Committed by
GitHub
Dec 26, 2023
Browse files
amused update links to new repo (#6344)
* amused update links to new repo * lint
parent
6e123688
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
33 deletions
+25
-33
docs/source/en/api/pipelines/amused.md
docs/source/en/api/pipelines/amused.md
+2
-2
examples/amused/README.md
examples/amused/README.md
+8
-8
src/diffusers/pipelines/amused/pipeline_amused.py
src/diffusers/pipelines/amused/pipeline_amused.py
+1
-1
src/diffusers/pipelines/amused/pipeline_amused_img2img.py
src/diffusers/pipelines/amused/pipeline_amused_img2img.py
+1
-1
src/diffusers/pipelines/amused/pipeline_amused_inpaint.py
src/diffusers/pipelines/amused/pipeline_amused_inpaint.py
+1
-1
tests/pipelines/amused/test_amused.py
tests/pipelines/amused/test_amused.py
+4
-4
tests/pipelines/amused/test_amused_img2img.py
tests/pipelines/amused/test_amused_img2img.py
+4
-8
tests/pipelines/amused/test_amused_inpaint.py
tests/pipelines/amused/test_amused_inpaint.py
+4
-8
No files found.
docs/source/en/api/pipelines/amused.md
View file @
0af12f1f
...
...
@@ -18,8 +18,8 @@ Amused is a vqvae token based transformer that can generate an image in fewer fo
| Model | Params |
|-------|--------|
|
[
amused-256
](
https://huggingface.co/
huggingface
/amused-256
)
| 603M |
|
[
amused-512
](
https://huggingface.co/
huggingface
/amused-512
)
| 608M |
|
[
amused-256
](
https://huggingface.co/
amused
/amused-256
)
| 603M |
|
[
amused-512
](
https://huggingface.co/
amused
/amused-512
)
| 608M |
## AmusedPipeline
...
...
examples/amused/README.md
View file @
0af12f1f
...
...
@@ -29,7 +29,7 @@ accelerate launch train_amused.py \
--train_batch_size
<batch size>
\
--gradient_accumulation_steps
<gradient accumulation steps>
\
--learning_rate
1e-4
\
--pretrained_model_name_or_path
huggingface
/amused-256
\
--pretrained_model_name_or_path
amused
/amused-256
\
--instance_data_dataset
'm1guelpf/nouns'
\
--image_key
image
\
--prompt_key
text
\
...
...
@@ -70,7 +70,7 @@ accelerate launch train_amused.py \
--gradient_accumulation_steps
<gradient accumulation steps>
\
--learning_rate
2e-5
\
--use_8bit_adam
\
--pretrained_model_name_or_path
huggingface
/amused-256
\
--pretrained_model_name_or_path
amused
/amused-256
\
--instance_data_dataset
'm1guelpf/nouns'
\
--image_key
image
\
--prompt_key
text
\
...
...
@@ -109,7 +109,7 @@ accelerate launch train_amused.py \
--gradient_accumulation_steps
<gradient accumulation steps>
\
--learning_rate
8e-4
\
--use_lora
\
--pretrained_model_name_or_path
huggingface
/amused-256
\
--pretrained_model_name_or_path
amused
/amused-256
\
--instance_data_dataset
'm1guelpf/nouns'
\
--image_key
image
\
--prompt_key
text
\
...
...
@@ -155,7 +155,7 @@ accelerate launch train_amused.py \
--train_batch_size
<batch size>
\
--gradient_accumulation_steps
<gradient accumulation steps>
\
--learning_rate
8e-5
\
--pretrained_model_name_or_path
huggingface
/amused-512
\
--pretrained_model_name_or_path
amused
/amused-512
\
--instance_data_dataset
'monadical-labs/minecraft-preview'
\
--prompt_prefix
'minecraft '
\
--image_key
image
\
...
...
@@ -191,7 +191,7 @@ accelerate launch train_amused.py \
--train_batch_size
<batch size>
\
--gradient_accumulation_steps
<gradient accumulation steps>
\
--learning_rate
5e-6
\
--pretrained_model_name_or_path
huggingface
/amused-512
\
--pretrained_model_name_or_path
amused
/amused-512
\
--instance_data_dataset
'monadical-labs/minecraft-preview'
\
--prompt_prefix
'minecraft '
\
--image_key
image
\
...
...
@@ -228,7 +228,7 @@ accelerate launch train_amused.py \
--gradient_accumulation_steps
<gradient accumulation steps>
\
--learning_rate
1e-4
\
--use_lora
\
--pretrained_model_name_or_path
huggingface
/amused-512
\
--pretrained_model_name_or_path
amused
/amused-512
\
--instance_data_dataset
'monadical-labs/minecraft-preview'
\
--prompt_prefix
'minecraft '
\
--image_key
image
\
...
...
@@ -276,7 +276,7 @@ accelerate launch train_amused.py \
--mixed_precision
fp16
\
--report_to
wandb
\
--use_lora
\
--pretrained_model_name_or_path
huggingface
/amused-256
\
--pretrained_model_name_or_path
amused
/amused-256
\
--train_batch_size
1
\
--lr_scheduler
constant
\
--learning_rate
4e-4
\
...
...
@@ -308,7 +308,7 @@ accelerate launch train_amused.py \
--mixed_precision fp16 \
--report_to wandb \
--use_lora \
--pretrained_model_name_or_path
huggingface
/amused-512 \
--pretrained_model_name_or_path
amused
/amused-512 \
--train_batch_size 1 \
--lr_scheduler constant \
--learning_rate 1e-3 \
...
...
src/diffusers/pipelines/amused/pipeline_amused.py
View file @
0af12f1f
...
...
@@ -31,7 +31,7 @@ EXAMPLE_DOC_STRING = """
>>> from diffusers import AmusedPipeline
>>> pipe = AmusedPipeline.from_pretrained(
... "
huggingface
/amused-512", variant="fp16", torch_dtype=torch.float16
... "
amused
/amused-512", variant="fp16", torch_dtype=torch.float16
... )
>>> pipe = pipe.to("cuda")
...
...
src/diffusers/pipelines/amused/pipeline_amused_img2img.py
View file @
0af12f1f
...
...
@@ -32,7 +32,7 @@ EXAMPLE_DOC_STRING = """
>>> from diffusers.utils import load_image
>>> pipe = AmusedImg2ImgPipeline.from_pretrained(
... "
huggingface
/amused-512", variant="fp16", torch_dtype=torch.float16
... "
amused
/amused-512", variant="fp16", torch_dtype=torch.float16
... )
>>> pipe = pipe.to("cuda")
...
...
src/diffusers/pipelines/amused/pipeline_amused_inpaint.py
View file @
0af12f1f
...
...
@@ -33,7 +33,7 @@ EXAMPLE_DOC_STRING = """
>>> from diffusers.utils import load_image
>>> pipe = AmusedInpaintPipeline.from_pretrained(
... "
huggingface
/amused-512", variant="fp16", torch_dtype=torch.float16
... "
amused
/amused-512", variant="fp16", torch_dtype=torch.float16
... )
>>> pipe = pipe.to("cuda")
...
...
tests/pipelines/amused/test_amused.py
View file @
0af12f1f
...
...
@@ -133,7 +133,7 @@ class AmusedPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
@
require_torch_gpu
class
AmusedPipelineSlowTests
(
unittest
.
TestCase
):
def
test_amused_256
(
self
):
pipe
=
AmusedPipeline
.
from_pretrained
(
"
huggingface
/amused-256"
)
pipe
=
AmusedPipeline
.
from_pretrained
(
"
amused
/amused-256"
)
pipe
.
to
(
torch_device
)
image
=
pipe
(
"dog"
,
generator
=
torch
.
Generator
().
manual_seed
(
0
),
num_inference_steps
=
2
,
output_type
=
"np"
).
images
...
...
@@ -145,7 +145,7 @@ class AmusedPipelineSlowTests(unittest.TestCase):
assert
np
.
abs
(
image_slice
-
expected_slice
).
max
()
<
3e-3
def
test_amused_256_fp16
(
self
):
pipe
=
AmusedPipeline
.
from_pretrained
(
"
huggingface
/amused-256"
,
variant
=
"fp16"
,
torch_dtype
=
torch
.
float16
)
pipe
=
AmusedPipeline
.
from_pretrained
(
"
amused
/amused-256"
,
variant
=
"fp16"
,
torch_dtype
=
torch
.
float16
)
pipe
.
to
(
torch_device
)
image
=
pipe
(
"dog"
,
generator
=
torch
.
Generator
().
manual_seed
(
0
),
num_inference_steps
=
2
,
output_type
=
"np"
).
images
...
...
@@ -157,7 +157,7 @@ class AmusedPipelineSlowTests(unittest.TestCase):
assert
np
.
abs
(
image_slice
-
expected_slice
).
max
()
<
7e-3
def
test_amused_512
(
self
):
pipe
=
AmusedPipeline
.
from_pretrained
(
"
huggingface
/amused-512"
)
pipe
=
AmusedPipeline
.
from_pretrained
(
"
amused
/amused-512"
)
pipe
.
to
(
torch_device
)
image
=
pipe
(
"dog"
,
generator
=
torch
.
Generator
().
manual_seed
(
0
),
num_inference_steps
=
2
,
output_type
=
"np"
).
images
...
...
@@ -169,7 +169,7 @@ class AmusedPipelineSlowTests(unittest.TestCase):
assert
np
.
abs
(
image_slice
-
expected_slice
).
max
()
<
3e-3
def
test_amused_512_fp16
(
self
):
pipe
=
AmusedPipeline
.
from_pretrained
(
"
huggingface
/amused-512"
,
variant
=
"fp16"
,
torch_dtype
=
torch
.
float16
)
pipe
=
AmusedPipeline
.
from_pretrained
(
"
amused
/amused-512"
,
variant
=
"fp16"
,
torch_dtype
=
torch
.
float16
)
pipe
.
to
(
torch_device
)
image
=
pipe
(
"dog"
,
generator
=
torch
.
Generator
().
manual_seed
(
0
),
num_inference_steps
=
2
,
output_type
=
"np"
).
images
...
...
tests/pipelines/amused/test_amused_img2img.py
View file @
0af12f1f
...
...
@@ -137,7 +137,7 @@ class AmusedImg2ImgPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
@
require_torch_gpu
class
AmusedImg2ImgPipelineSlowTests
(
unittest
.
TestCase
):
def
test_amused_256
(
self
):
pipe
=
AmusedImg2ImgPipeline
.
from_pretrained
(
"
huggingface
/amused-256"
)
pipe
=
AmusedImg2ImgPipeline
.
from_pretrained
(
"
amused
/amused-256"
)
pipe
.
to
(
torch_device
)
image
=
(
...
...
@@ -162,9 +162,7 @@ class AmusedImg2ImgPipelineSlowTests(unittest.TestCase):
assert
np
.
abs
(
image_slice
-
expected_slice
).
max
()
<
1e-2
def
test_amused_256_fp16
(
self
):
pipe
=
AmusedImg2ImgPipeline
.
from_pretrained
(
"huggingface/amused-256"
,
torch_dtype
=
torch
.
float16
,
variant
=
"fp16"
)
pipe
=
AmusedImg2ImgPipeline
.
from_pretrained
(
"amused/amused-256"
,
torch_dtype
=
torch
.
float16
,
variant
=
"fp16"
)
pipe
.
to
(
torch_device
)
image
=
(
...
...
@@ -189,7 +187,7 @@ class AmusedImg2ImgPipelineSlowTests(unittest.TestCase):
assert
np
.
abs
(
image_slice
-
expected_slice
).
max
()
<
1e-2
def
test_amused_512
(
self
):
pipe
=
AmusedImg2ImgPipeline
.
from_pretrained
(
"
huggingface
/amused-512"
)
pipe
=
AmusedImg2ImgPipeline
.
from_pretrained
(
"
amused
/amused-512"
)
pipe
.
to
(
torch_device
)
image
=
(
...
...
@@ -213,9 +211,7 @@ class AmusedImg2ImgPipelineSlowTests(unittest.TestCase):
assert
np
.
abs
(
image_slice
-
expected_slice
).
max
()
<
0.1
def
test_amused_512_fp16
(
self
):
pipe
=
AmusedImg2ImgPipeline
.
from_pretrained
(
"huggingface/amused-512"
,
variant
=
"fp16"
,
torch_dtype
=
torch
.
float16
)
pipe
=
AmusedImg2ImgPipeline
.
from_pretrained
(
"amused/amused-512"
,
variant
=
"fp16"
,
torch_dtype
=
torch
.
float16
)
pipe
.
to
(
torch_device
)
image
=
(
...
...
tests/pipelines/amused/test_amused_inpaint.py
View file @
0af12f1f
...
...
@@ -141,7 +141,7 @@ class AmusedInpaintPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
@
require_torch_gpu
class
AmusedInpaintPipelineSlowTests
(
unittest
.
TestCase
):
def
test_amused_256
(
self
):
pipe
=
AmusedInpaintPipeline
.
from_pretrained
(
"
huggingface
/amused-256"
)
pipe
=
AmusedInpaintPipeline
.
from_pretrained
(
"
amused
/amused-256"
)
pipe
.
to
(
torch_device
)
image
=
(
...
...
@@ -174,9 +174,7 @@ class AmusedInpaintPipelineSlowTests(unittest.TestCase):
assert
np
.
abs
(
image_slice
-
expected_slice
).
max
()
<
0.1
def
test_amused_256_fp16
(
self
):
pipe
=
AmusedInpaintPipeline
.
from_pretrained
(
"huggingface/amused-256"
,
variant
=
"fp16"
,
torch_dtype
=
torch
.
float16
)
pipe
=
AmusedInpaintPipeline
.
from_pretrained
(
"amused/amused-256"
,
variant
=
"fp16"
,
torch_dtype
=
torch
.
float16
)
pipe
.
to
(
torch_device
)
image
=
(
...
...
@@ -209,7 +207,7 @@ class AmusedInpaintPipelineSlowTests(unittest.TestCase):
assert
np
.
abs
(
image_slice
-
expected_slice
).
max
()
<
0.1
def
test_amused_512
(
self
):
pipe
=
AmusedInpaintPipeline
.
from_pretrained
(
"
huggingface
/amused-512"
)
pipe
=
AmusedInpaintPipeline
.
from_pretrained
(
"
amused
/amused-512"
)
pipe
.
to
(
torch_device
)
image
=
(
...
...
@@ -242,9 +240,7 @@ class AmusedInpaintPipelineSlowTests(unittest.TestCase):
assert
np
.
abs
(
image_slice
-
expected_slice
).
max
()
<
0.05
def
test_amused_512_fp16
(
self
):
pipe
=
AmusedInpaintPipeline
.
from_pretrained
(
"huggingface/amused-512"
,
variant
=
"fp16"
,
torch_dtype
=
torch
.
float16
)
pipe
=
AmusedInpaintPipeline
.
from_pretrained
(
"amused/amused-512"
,
variant
=
"fp16"
,
torch_dtype
=
torch
.
float16
)
pipe
.
to
(
torch_device
)
image
=
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment