code_execution_files / Photoroom_prx-1024-t2i-beta_0.txt
ariG23498's picture
ariG23498 HF Staff
Upload Photoroom_prx-1024-t2i-beta_0.txt with huggingface_hub
5532796 verified
raw
history blame
2.29 kB
```CODE:
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("Photoroom/prx-1024-t2i-beta", dtype=torch.bfloat16, device_map="cuda")
prompt = "A close-up portrait in a photography studio, multiple soft light sources creating gradients of shadow on her face, minimal background, cinematic 4 K realism, artistic focus on light and emotion rather than glamour."
image = pipe(prompt).images[0]
```
ERROR:
Traceback (most recent call last):
File "/tmp/Photoroom_prx-1024-t2i-beta_0HegzOA.py", line 27, in <module>
pipe = DiffusionPipeline.from_pretrained("Photoroom/prx-1024-t2i-beta", dtype=torch.bfloat16, device_map="cuda")
File "/tmp/.cache/uv/environments-v2/42b1c635ea4813b7/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/tmp/.cache/uv/environments-v2/42b1c635ea4813b7/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 833, in from_pretrained
cached_folder = cls.download(
pretrained_model_name_or_path,
...<14 lines>...
**kwargs,
)
File "/tmp/.cache/uv/environments-v2/42b1c635ea4813b7/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/tmp/.cache/uv/environments-v2/42b1c635ea4813b7/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1522, in download
custom_components, folder_names = _get_custom_components_and_folders(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
pretrained_model_name, config_dict, filenames, variant
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/tmp/.cache/uv/environments-v2/42b1c635ea4813b7/lib/python3.13/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 1051, in _get_custom_components_and_folders
raise ValueError(
f"{candidate_file} as defined in `model_index.json` does not exist in {pretrained_model_name} and is not a module in 'diffusers/pipelines'."
)
ValueError: text_encoder/prx.py as defined in `model_index.json` does not exist in Photoroom/prx-1024-t2i-beta and is not a module in 'diffusers/pipelines'.