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
fengzch-das
nunchaku
Commits
7eb31b0f
You need to sign in or sign up before continuing.
Unverified
Commit
7eb31b0f
authored
Jul 23, 2025
by
Muyang Li
Committed by
GitHub
Jul 23, 2025
Browse files
feat: add the example script of colossus (#558)
* add colossus script * finalize colossus
parent
e2953c01
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
examples/flux.1-dev-colossus.py
examples/flux.1-dev-colossus.py
+19
-0
No files found.
examples/flux.1-dev-colossus.py
0 → 100644
View file @
7eb31b0f
import
torch
from
diffusers
import
FluxPipeline
from
nunchaku
import
NunchakuFluxTransformer2dModel
from
nunchaku.utils
import
get_precision
precision
=
get_precision
()
# auto-detect your precision is 'int4' or 'fp4' based on your GPU
transformer
=
NunchakuFluxTransformer2dModel
.
from_pretrained
(
f
"nunchaku-tech/nunchaku-flux.1-dev-colossus/svdq-
{
precision
}
_r32-flux.1-dev-colossusv12.safetensors"
)
pipeline
=
FluxPipeline
.
from_pretrained
(
"black-forest-labs/FLUX.1-dev"
,
transformer
=
transformer
,
torch_dtype
=
torch
.
bfloat16
).
to
(
"cuda"
)
image
=
pipeline
(
"face portrait of a 20 years old woman , gothic short blue hair, ruby collar, she is touch her cheek"
,
num_inference_steps
=
50
,
guidance_scale
=
3.5
,
).
images
[
0
]
image
.
save
(
f
"flux.1-dev-colossus-
{
precision
}
.png"
)
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