alfredplpl commited on
Commit
f331de0
·
verified ·
1 Parent(s): f4d4f1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -21
app.py CHANGED
@@ -6,11 +6,6 @@ import torch
6
  from diffusers import Flux2KleinPipeline
7
  import os
8
 
9
- from diffusers import Flux2KleinPipeline, TorchAoConfig, PipelineQuantizationConfig
10
- from torchao.prototype.mx_formats.inference_workflow import (
11
- NVFP4DynamicActivationNVFP4WeightConfig,
12
- )
13
-
14
  MODEL_ID = "alfredplpl/ecocoro"
15
 
16
  DEFAULT_PROMPT = "recent, highreso, 1girl, solo, close-up, brown hair, blue eyes, white T-shirts, ahoge, looking at viewer, blue background, simple background"
@@ -22,27 +17,11 @@ ASPECT_RATIOS = {
22
 
23
  token=os.environ["HF_TOKEN"]
24
 
25
- import torch
26
-
27
- config = NVFP4DynamicActivationNVFP4WeightConfig(
28
- use_dynamic_per_tensor_scale=True,
29
- use_triton_kernel=True,
30
- )
31
-
32
- pipe_quant_config = PipelineQuantizationConfig(
33
- quant_mapping={
34
- "transformer": TorchAoConfig(config),
35
- }
36
- )
37
-
38
  pipe = Flux2KleinPipeline.from_pretrained(
39
  MODEL_ID,
40
  torch_dtype=torch.bfloat16,
41
- quantization_config=pipe_quant_config,
42
  ).to("cuda")
43
 
44
- pipe.transformer.compile_repeated_blocks(fullgraph=True)
45
-
46
 
47
  def get_duration(prompt, aspect_ratio):
48
  return 120
 
6
  from diffusers import Flux2KleinPipeline
7
  import os
8
 
 
 
 
 
 
9
  MODEL_ID = "alfredplpl/ecocoro"
10
 
11
  DEFAULT_PROMPT = "recent, highreso, 1girl, solo, close-up, brown hair, blue eyes, white T-shirts, ahoge, looking at viewer, blue background, simple background"
 
17
 
18
  token=os.environ["HF_TOKEN"]
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  pipe = Flux2KleinPipeline.from_pretrained(
21
  MODEL_ID,
22
  torch_dtype=torch.bfloat16,
 
23
  ).to("cuda")
24
 
 
 
25
 
26
  def get_duration(prompt, aspect_ratio):
27
  return 120