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
renzhc
diffusers_dcu
Commits
a26d5709
Unverified
Commit
a26d5709
authored
Jan 09, 2025
by
geronimi73
Committed by
GitHub
Jan 09, 2025
Browse files
AutoModel instead of AutoModelForCausalLM (#10507)
parent
daf9d0f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
docs/source/en/api/pipelines/sana.md
docs/source/en/api/pipelines/sana.md
+2
-2
No files found.
docs/source/en/api/pipelines/sana.md
View file @
a26d5709
...
...
@@ -59,10 +59,10 @@ Refer to the [Quantization](../../quantization/overview) overview to learn more
```
py
import
torch
from
diffusers
import
BitsAndBytesConfig
as
DiffusersBitsAndBytesConfig
,
SanaTransformer2DModel
,
SanaPipeline
from
transformers
import
BitsAndBytesConfig
as
BitsAndBytesConfig
,
AutoModel
ForCausalLM
from
transformers
import
BitsAndBytesConfig
as
BitsAndBytesConfig
,
AutoModel
quant_config
=
BitsAndBytesConfig
(
load_in_8bit
=
True
)
text_encoder_8bit
=
AutoModel
ForCausalLM
.
from_pretrained
(
text_encoder_8bit
=
AutoModel
.
from_pretrained
(
"Efficient-Large-Model/Sana_1600M_1024px_diffusers"
,
subfolder
=
"text_encoder"
,
quantization_config
=
quant_config
,
...
...
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